public class MatrixList extends NaryFunction implements MatrixFunctionI
curNumberOfParameters, name, NaN, numberOfParameters
Constructor and Description |
---|
MatrixList(MatrixFactoryI mf) |
Modifier and Type | Method and Description |
---|---|
Dimensions |
calcDims(Dimensions... inDims)
Attempts to calculate the dimensions of a result of a PostfixMathCommand.
|
boolean |
checkNumberOfParameters(int n)
Checks the number of parameters of the function.
|
java.lang.Object |
eval(java.lang.Object[] args)
Evaluate the function
|
void |
run(java.util.Stack<java.lang.Object> stack)
Creates an array of object then calls
NaryFunction.eval(Object[]) |
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
public MatrixList(MatrixFactoryI mf)
mf
- public boolean checkNumberOfParameters(int n)
PostfixMathCommand
checkNumberOfParameters
in interface PostfixMathCommandI
checkNumberOfParameters
in class PostfixMathCommand
n
- number of parameters function will be called with.public java.lang.Object eval(java.lang.Object[] args) throws EvaluationException
NaryFunction
eval
in class NaryFunction
args
- arguments to the functionEvaluationException
- if the calculation cannot be performedpublic void run(java.util.Stack<java.lang.Object> stack) throws EvaluationException
NaryFunction
NaryFunction.eval(Object[])
run
in interface PostfixMathCommandI
run
in class NaryFunction
stack
- arguments for functionEvaluationException
- if function cannot be evaluatedpublic 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