public class MatrixSize extends UnaryFunction implements MatrixFunctionI
size(7) -> 1 size([1,2,3]) -> 3 size([[1,2,3],[4,5,6]]) -> [2,3]
curNumberOfParameters, name, NaN, numberOfParameters
Constructor and Description |
---|
MatrixSize(MatrixFactoryI mfact,
IntegerConvertor conv) |
Modifier and Type | Method and Description |
---|---|
Dimensions |
calcDims(Dimensions... inDims)
Attempts to calculate the dimensions of a result of a PostfixMathCommand.
|
java.lang.Object |
eval(java.lang.Object arg) |
run
asArray, asBool, asDouble, asInt, asLong, asStrictInt, asString, checkNumberOfParameters, getName, getNumberOfParameters, setCurNumberOfParameters, setName, toString, toString
public MatrixSize(MatrixFactoryI mfact, IntegerConvertor conv)
public java.lang.Object eval(java.lang.Object arg) throws EvaluationException
eval
in class UnaryFunction
EvaluationException
public 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