Package org.lsmp.djep.vectorJep.function
Class ArrayAccess
java.lang.Object
org.nfunk.jep.function.PostfixMathCommand
org.lsmp.djep.vectorJep.function.VEle
org.lsmp.djep.vectorJep.function.ArrayAccess
- All Implemented Interfaces:
BinaryOperatorI
,LValueI
,PostfixMathCommandI
- Direct Known Subclasses:
MArrayAccess
A postfix MathCommand which facilitates the getting and setting of vector and matrix elements.
The class implements the set method of LValueI., read access is handled by parent VEle class.
For examples
a=[1,2,3];
a[2]=4;
b=[[1,2],[3,4]];
b[2,1]=5;
- Author:
- Richard Morris TODO implement setting slices a[3:5]=[3,4,5] a[1,]=[1,3]
-
Field Summary
Fields inherited from class org.nfunk.jep.function.PostfixMathCommand
curNumberOfParameters, numberOfParameters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
set
(EvaluatorI pv, Node node, Object value) Sets the LValue.Methods inherited from class org.nfunk.jep.function.PostfixMathCommand
checkNumberOfParameters, checkStack, getNumberOfParameters, setCurNumberOfParameters
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.nfunk.jep.function.PostfixMathCommandI
checkNumberOfParameters, getNumberOfParameters, setCurNumberOfParameters
-
Constructor Details
-
ArrayAccess
public ArrayAccess()
-
-
Method Details
-
set
Sets the LValue. For the equation a[2]=5- Specified by:
set
in interfaceLValueI
- Parameters:
pv
- a pointer to the evaluator. The pv.eval() method can be used to evaluate the children of the node.node
- The top node for the LValuevalue
- the value obtained by evaluating the right hand side.- Throws:
ParseException
-