public class XAssign extends PostfixMathCommand implements CallbackEvaluationI, CommandVisitorI, JepComponent
curNumberOfParameters, name, NaN, numberOfParameters| Constructor and Description |
|---|
XAssign()
Constructor using
Assign for the basic evaluation method. |
XAssign(boolean useEqn)
Constructor to suppress copying of equations
|
XAssign(CallbackEvaluationI root)
Decorator constructor using a specified function for evaluation.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
evaluate(Node node,
Evaluator pv)
Performs some special evaluation on the node.
|
JepComponent |
getLightWeightInstance()
Gets a light-weight instance suitable for using in multiple threads.
|
void |
init(Jep jep)
Initialize the component.
|
boolean |
isUseEquation()
Whether equations are used.
|
Node |
process(Node node,
Node[] children)
In the pre-process stage, set the equation of the lhs variable to the rhs equation.
|
void |
run(java.util.Stack<java.lang.Object> aStack)
Throws an exception because this method should never be called under
normal circumstances.
|
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toStringpublic XAssign()
Assign for the basic evaluation method.public XAssign(boolean useEqn)
useEqn - if false equations are never setpublic XAssign(CallbackEvaluationI root)
root - function used for evaluationpublic Node process(Node node, Node[] children) throws ParseException
process in interface CommandVisitorInode - top node of the treechildren - the children of the node after they have been preprocessed.ParseExceptionpublic java.lang.Object evaluate(Node node, Evaluator pv) throws EvaluationException
CallbackEvaluationIpv.eval(node.jjtGetChild(i))for each child. The SymbolTable is not passed as an argument. This is because it is better practice to get and set variable values by using node.getVar().setValue() rather that through the SymbolTable with requires a hashtable lookup.
evaluate in interface CallbackEvaluationInode - The current nodepv - The visitor, can be used evaluate the childrenEvaluationException - if the calculation cannot be performedEvaluatorpublic void run(java.util.Stack<java.lang.Object> aStack)
throws EvaluationException
PostfixMathCommandrun in interface PostfixMathCommandIrun in class PostfixMathCommandaStack - arguments for functionEvaluationException - if function cannot be evaluatedpublic boolean isUseEquation()
public void init(Jep jep)
JepComponentinit in interface JepComponentjep - the current Jep instancepublic JepComponent getLightWeightInstance()
JepComponentgetLightWeightInstance in interface JepComponentCopyright © 2018 Singular Systems http://www.singularsys.com/jep