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 | Field and Description |
|---|---|
protected java.lang.String |
name
The name of the function, use in error reporting.
|
curNumberOfParameters, numberOfParameters| Constructor and Description |
|---|
SumType() |
SumType(java.lang.String funName) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkNumberOfParameters(int n)
Checks the number of parameters of the function.
|
java.lang.Object |
evaluate(Node node,
EvaluatorI pv)
Evaluates the operator in given context.
|
java.lang.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 java.lang.Object |
evaluate(java.lang.Object[] elements)
Evaluates the function given the set of y values.
|
void |
run(java.util.Stack s)
run method.
|
checkStack, getNumberOfParameters, setCurNumberOfParameterspublic boolean checkNumberOfParameters(int n)
PostfixMathCommandcheckNumberOfParameters in interface PostfixMathCommandIcheckNumberOfParameters in class PostfixMathCommandn - number of parameters function will be called with.public java.lang.Object evaluate(Node node, EvaluatorI pv) throws ParseException
evaluate in interface CallbackEvaluationInode - The current nodepv - The visitor, can be used evaluate the childrenParseExceptionpublic java.lang.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 - ParseExceptionpublic abstract java.lang.Object evaluate(java.lang.Object[] elements)
throws ParseException
elements - the y valuesParseExceptionpublic void run(java.util.Stack s)
throws ParseException
run in interface PostfixMathCommandIrun in class PostfixMathCommandParseExceptionhttp://www.singularsys.com/jep Copyright © 2007 Singular Systems