Package com.singularsys.extensions.fastreal
Fast evaluation routines over doubles, can be up to ten times faster than standard Jep.
// Construct the compiler/evaluator
RpEval rpe = new RpEval(jep);
// Compile an expression
RpCommandList commands = rpe.compile(expression);
// Get a reference number for the "x" variable
int xRef = rpe.getVarRef("x");
// loop
for(double x=-1.0;x<=1.0;x+=0.01) {
// set the value of "x"
rpe.setVarValue(xRef,x);
// evaluate
double res = rpe.evaluate(commands);
}
- Since:
- Jep 3.5 / Extensions 2.0
- See Also:
- Manual page
-
Class Summary Class Description AbstractEval Abstract base class for rpe-base evaluation routines.RpCommand Data type for the command stringRpCommandList A list of commandsRpConstants Constants used by the evaluator.RpEval A fast evaluation algorithm for equations over Doubles, does not work with vectors or matrices.RpEvaluator An evaluator using the RpEval system.