|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.singularsys.jep.reals.RealEvaluator
public class RealEvaluator
Performs fast evaluation of expressions by using primitive types double and boolean instead of objects.
Constructor Summary | |
---|---|
RealEvaluator()
|
Method Summary | |
---|---|
java.lang.Object |
eval(Node node)
Evaluates a sub expression. |
java.lang.Object |
evaluate(Node node)
Evaluates a node and returns and object with the value of the node. |
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)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RealEvaluator()
Method Detail |
---|
public java.lang.Object evaluate(Node node) throws EvaluationException
Evaluator
evaluate
in interface Evaluator
EvaluationException
- if errors occur during evaluation;public java.lang.Object eval(Node node) throws EvaluationException
Evaluator
eval
in interface Evaluator
EvaluationException
- 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
public JepComponent getLightWeightInstance()
JepComponent
getLightWeightInstance
in interface JepComponent
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |