public class RealEvaluator extends java.lang.Object implements Evaluator
Constructor and Description |
---|
RealEvaluator() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
eval(Node node)
Evaluates a sub expression.
|
java.lang.Object |
evaluate(Node node)
Main entry point, evaluates a node and returns and object with the value of the node.
|
protected static double |
fromObject(java.lang.Object o) |
JepComponent |
getLightWeightInstance()
Gets a light-weight instance suitable for using in multiple threads.
|
void |
init(Jep jep)
Initialize the component.
|
protected double |
visit(Node node) |
protected double[] |
visitChildren(ASTFunNode node) |
protected double |
visitConstant(ASTConstant node) |
protected double |
visitFunction(ASTFunNode node) |
protected double |
visitVariable(ASTVarNode node) |
public java.lang.Object evaluate(Node node) throws EvaluationException
Evaluator
evaluate
in interface Evaluator
node
- node to evaluateEvaluationException
- if errors occur during evaluation;public java.lang.Object eval(Node node) throws EvaluationException
Evaluator
CallbackEvaluationI
eval
in interface Evaluator
node
- node to evaluateEvaluationException
- if errors occur during evaluation;public void init(Jep jep)
JepComponent
init
in interface JepComponent
jep
- the current Jep instanceprotected double visit(Node node) throws EvaluationException
EvaluationException
protected double[] visitChildren(ASTFunNode node) throws EvaluationException
EvaluationException
protected double visitFunction(ASTFunNode node) throws EvaluationException
EvaluationException
protected double visitVariable(ASTVarNode node) throws EvaluationException
EvaluationException
protected double visitConstant(ASTConstant node) throws EvaluationException
EvaluationException
protected static double fromObject(java.lang.Object o) throws EvaluationException
EvaluationException
public JepComponent getLightWeightInstance()
JepComponent
getLightWeightInstance
in interface JepComponent
Copyright © 2018 Singular Systems http://www.singularsys.com/jep