/*
* Copyright (C) 2011 Alasdair C. Hamilton
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package ket.math.purpose.symbolicFunctions;
import java.awt.*;
import java.util.*;
import ket.display.box.BoxWord;
import ket.display.LatexTools;
import ket.display.*;
import ket.display.box.Box;
import ket.display.box.BoxGraphic;
import ket.display.box.BoxList;
import ket.display.box.BoxTools;
import ket.math.*;
import ket.math.purpose.SymbolicState;
import ket.math.convert.Like;
/**
* A specific mathematical operation that acts on arguments in a case-specific
* way.
*/
public class SymbolicFunctionSet extends SymbolicFunctionForm {
@Override
public Box toBox(Argument argument, long settings, ColourScheme colourScheme, Vector<Argument> args) {
if (args.size()==0) {
return super.toBox(argument, settings, colourScheme, args);
}
Vector<Box> boxArgs = BoxTools.padArgs(args, getArgLowerLimit(args.size()), colourScheme);
Box box = BoxTools.commaList(argument, boxArgs, settings, colourScheme);
box.setArgument(argument);
Box parenthesis = BoxTools.parentheses(box, settings, colourScheme);
return parenthesis;
}
}