Package com.singularsys.extensions.fastreal
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:
-
ClassesClassDescriptionAbstract base class for rpe-base evaluation routines.Data type for the command stringA list of commandsConstants used by the evaluator.A fast evaluation algorithm for equations over Doubles, does not work with vectors or matrices.An evaluator using the RpEval system.