public class MatrixEle extends Ele implements MatrixFunctionI
indexShift
curNumberOfParameters, name, NaN, numberOfParameters
Constructor and Description |
---|
MatrixEle(MatrixFactoryI mfact,
IntegerConvertor conv) |
MatrixEle(MatrixFactoryI mfact,
IntegerConvertor conv,
boolean javaIndex)
Element access, either java convention (first element has index 0) or mathematical convention (first element has index 1) can be specified.
|
Modifier and Type | Method and Description |
---|---|
Dimensions |
calcDims(Dimensions... inDims)
Attempts to calculate the dimensions of a result of a PostfixMathCommand.
|
java.lang.Object |
ele(java.lang.Object vec,
java.lang.Object rhs)
Find the element of a vector
|
java.lang.Object |
ele(java.lang.Object mat,
java.lang.Object[] args)
Find element of a multi-dimensional array
|
java.lang.Object |
ele(java.lang.Object mat,
java.lang.Object row,
java.lang.Object col)
Find the element of a matrix
|
void |
set(Evaluator pv,
Node node,
java.lang.Object value)
Performs appropriate action to set an LValue.
|
checkNumberOfParameters, ele, eval, getVariable
run
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
public MatrixEle(MatrixFactoryI mfact, IntegerConvertor conv)
public MatrixEle(MatrixFactoryI mfact, IntegerConvertor conv, boolean javaIndex)
javaIndex
- whether to use the java convention, if true index start at 0.public java.lang.Object ele(java.lang.Object vec, java.lang.Object rhs) throws EvaluationException
Ele
ele
in class Ele
vec
- the vectorrhs
- the index either as a vector with a single value or as a single value.EvaluationException
- if the calculation cannot be performedpublic java.lang.Object ele(java.lang.Object mat, java.lang.Object row, java.lang.Object col) throws EvaluationException
Ele
ele
in class Ele
mat
- the matrix represented a a Vector<Vector<Object>>row
- the indexcol
- the indexEvaluationException
- if the calculation cannot be performedpublic java.lang.Object ele(java.lang.Object mat, java.lang.Object[] args) throws EvaluationException
Ele
ele
in class Ele
mat
- the arrayargs
- array of indicesEvaluationException
- if the calculation cannot be performedpublic void set(Evaluator pv, Node node, java.lang.Object value) throws EvaluationException
LValueI
set
in interface LValueI
set
in class Ele
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.EvaluationException
- if the calculation cannot be performedpublic Dimensions calcDims(Dimensions... inDims) throws ParseException
MatrixFunctionI
calcDims
in interface MatrixFunctionI
inDims
- the dimensions of each argumentParseException
- if there is a parse errorCopyright © 2018 Singular Systems http://www.singularsys.com/jep