public abstract class SumType extends PostfixMathCommand implements CallbackEvaluationI
public abstract Object evaluate(Object elements[]) throws ParseException;method, which is passed an array of the value
Modifier and Type | Method and Description |
---|---|
boolean |
checkNumberOfParameters(int n)
Checks the number of parameters of the function.
|
Object |
evaluate(Node node,
EvaluatorI pv)
Evaluates the operator in given context.
|
Object |
evaluate(Node node,
Variable var,
double min,
double max,
double inc,
EvaluatorI pv)
Evaluates the node by repeatibly setting the value of the variable from min to max, and calculating the value of the first argument.
|
abstract Object |
evaluate(Object[] elements)
Evaluates the function given the set of y values.
|
void |
run(Stack s)
run method.
|
getNumberOfParameters, setCurNumberOfParameters
public SumType(String funName)
public SumType()
public boolean checkNumberOfParameters(int n)
PostfixMathCommand
checkNumberOfParameters
in interface PostfixMathCommandI
checkNumberOfParameters
in class PostfixMathCommand
n
- number of parameters function will be called with.public Object evaluate(Node node, EvaluatorI pv) throws ParseException
evaluate
in interface CallbackEvaluationI
node
- The current nodepv
- The visitor, can be used evaluate the childrenParseException
public Object evaluate(Node node, Variable var, double min, double max, double inc, EvaluatorI pv) throws ParseException
evaluate(Object[])
is more useful. If they do they should follow the pattern used here.node
- var
- min
- max
- inc
- pv
- ParseException
public abstract Object evaluate(Object[] elements) throws ParseException
elements
- the y valuesParseException
public void run(Stack s) throws ParseException
run
in interface PostfixMathCommandI
run
in class PostfixMathCommand
ParseException
Jas4pp 1.5 © Java Analysis Studio for Particle Physics