public class Size extends PostfixMathCommand implements UnaryOperatorI
size(7) -> 1 size([1,2,3]) -> 3 size([[1,2,3],[4,5,6]]) -> [2,3] size([[[1,2],[3,4],[5,6]],[[7,8],[9,10],[11,12]]]) -> [2,3,2]
Constructor and Description |
---|
Size() |
Modifier and Type | Method and Description |
---|---|
Dimensions |
calcDim(Dimensions ldim)
Find the dimensions of this operator when applied to arguments with given dimensions.
|
MatrixValueI |
calcValue(MatrixValueI res,
MatrixValueI lhs)
Calculates the value of this operator for given input with results stored in res.
|
void |
run(Stack s)
Throws an exception because this method should never be called under
normal circumstances.
|
checkNumberOfParameters, getNumberOfParameters, setCurNumberOfParameters
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkNumberOfParameters, getNumberOfParameters, setCurNumberOfParameters
public Dimensions calcDim(Dimensions ldim)
UnaryOperatorI
calcDim
in interface UnaryOperatorI
public MatrixValueI calcValue(MatrixValueI res, MatrixValueI lhs) throws ParseException
UnaryOperatorI
calcValue
in interface UnaryOperatorI
ParseException
public void run(Stack s) throws ParseException
PostfixMathCommand
run
in interface PostfixMathCommandI
run
in class PostfixMathCommand
ParseException
Jas4pp 1.5 © Java Analysis Studio for Particle Physics