public class VMap extends PostfixMathCommand implements NaryOperatorI, CallbackEvaluationI
curNumberOfParameters, numberOfParameters| Constructor and Description |
|---|
VMap() |
| Modifier and Type | Method and Description |
|---|---|
Dimensions |
calcDim(Dimensions[] dims)
Find the dimensions of this operator when applied to arguments with given dimensions.
|
MatrixValueI |
calcValue(MatrixValueI res,
MatrixValueI[] inputs)
Calculates the value of this operator for given input with results stored in res.
|
boolean |
checkNumberOfParameters(int n)
Checks the number of parameters of the function.
|
Object |
evaluate(Node node,
EvaluatorI pv)
Performs some special evaluation on the node.
|
static Variable[] |
getVars(Node varsNode) |
checkStack, getNumberOfParameters, run, setCurNumberOfParametersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNumberOfParameters, run, setCurNumberOfParameterspublic Dimensions calcDim(Dimensions[] dims) throws ParseException
NaryOperatorIcalcDim in interface NaryOperatorIParseExceptionpublic MatrixValueI calcValue(MatrixValueI res, MatrixValueI[] inputs) throws ParseException
NaryOperatorIcalcValue in interface NaryOperatorIParseExceptionpublic static Variable[] getVars(Node varsNode) throws ParseException
ParseExceptionpublic boolean checkNumberOfParameters(int n)
PostfixMathCommandcheckNumberOfParameters in interface PostfixMathCommandIcheckNumberOfParameters in class PostfixMathCommandn - number of parameters function will be called with.public Object evaluate(Node node, EvaluatorI pv) throws ParseException
CallbackEvaluationIpv.eval(node.jjtGetChild(i))for each child. The SymbolTable is not passed as an argument. This is because it is better practice to get and set variable values by using node.getVar().setValue() rather that through the SymbolTable with requires a hashtable lookup.
evaluate in interface CallbackEvaluationInode - The current nodepv - The visitor, can be used evaluate the childrenParseExceptionCopyright © 2018. All rights reserved.