See: Description
| Class | Description |
|---|---|
| AbstractEval |
Abstract base class for rpe-base evaluation routines.
|
| RpCommand |
Data type for the command string
|
| RpCommandList |
A list of commands
|
| RpConstants |
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.
|
// 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);
}
Copyright © 2018 Singular Systems http://www.singularsys.com/jep