public interface ExpressionCommand extends Serializable
Modifier and Type | Method and Description |
---|---|
void |
appendOutputString(ExpressionProgram prog,
int myIndex,
StringBuffer buffer)
The ExpressionCommand occurs in the program prog at the index indicated by myIndex.
|
void |
apply(StackOfDouble stack,
Cases cases)
This routine is called when an ExpressionCommand object is encountered during
the evaluation of an ExpressionProgram.
|
void |
compileDerivative(ExpressionProgram prog,
int myIndex,
ExpressionProgram deriv,
Variable wrt)
The ExpressionCommand occurs in the program prog at the index indicated by myIndex.
|
boolean |
dependsOn(Variable x)
Return true if this command depends on the value of x, false otherwise.
|
int |
extent(ExpressionProgram prog,
int myIndex)
The ExpressionCommand occurs in the program prog at the index indicated by myIndex.
|
void apply(StackOfDouble stack, Cases cases)
stack
- contains results of previous commands in the program.cases
- if non-null, any case information generated during evaluation should be recorded here.void compileDerivative(ExpressionProgram prog, int myIndex, ExpressionProgram deriv, Variable wrt)
prog
- program in which ExpressionCommand occurs.myIndex
- point at which ExpressionCommand occurs in the ExpressionProgram.deriv
- the derivative of the ExpressionPorgram prog, which is in the process of being computed.
Commands should added to deriv that will compute the derivative of this ExpressionCommand.wrt
- commands are added to deriv with respect to this Variable.int extent(ExpressionProgram prog, int myIndex)
prog
- ExpressionProgram in which this ExpressionCommand occurs.myIndex
- index at which ExpressionCommand occurs in prog.boolean dependsOn(Variable x)
void appendOutputString(ExpressionProgram prog, int myIndex, StringBuffer buffer)