public class MAssign extends Assign implements MatrixSpecialEvaluationI, SpecialPreProcessorI
Constructor and Description |
---|
MAssign() |
Modifier and Type | Method and Description |
---|---|
MatrixValueI |
evaluate(MatrixNodeI node,
MatrixEvaluator visitor,
MatrixJep j)
A special methods for evaluating an assignment.
|
MatrixNodeI |
preprocess(ASTFunNode node,
MatrixPreprocessor visitor,
MatrixJep mjep,
MatrixNodeFactory nf)
Subverts the preprocessing stage.
|
void |
run(Stack s)
The run method should not be called.
|
checkNumberOfParameters, getNumberOfParameters, setCurNumberOfParameters
public void run(Stack s) throws ParseException
evaluate(org.lsmp.djep.matrixJep.nodeTypes.MatrixNodeI, org.lsmp.djep.matrixJep.MatrixEvaluator, org.lsmp.djep.matrixJep.MatrixJep)
instead.run
in interface PostfixMathCommandI
run
in class PostfixMathCommand
ParseException
public MatrixValueI evaluate(MatrixNodeI node, MatrixEvaluator visitor, MatrixJep j) throws ParseException
evaluate
in interface MatrixSpecialEvaluationI
node
- The top node.visitor
- The parser visitorj
- The current MatrixJep instance.ParseException
public MatrixNodeI preprocess(ASTFunNode node, MatrixPreprocessor visitor, MatrixJep mjep, MatrixNodeFactory nf) throws ParseException
SpecialPreProcessorI
MatrixNodeI children[] = visitor.visitChildrenAsArray(node,null);The final step is to construct a node of the correct type. The MatrixNodeFactory argument has a number of methods to do this. For example
return (ASTMFunNode) nf.buildOperatorNode(node.getOperator(),children,rhsDim);Note how the dimension is specified.
preprocess
in interface SpecialPreProcessorI
node
- the top node of the tree representing the function and its arguments.visitor
- A reference to the preprocessing visitor.mjep
- A reference of the MatrixJep instance.nf
- A reference to the node factory object.ParseException
- if some error occurs.Jas4pp 1.5 © Java Analysis Studio for Particle Physics