public class MList extends VList implements PrintVisitor.PrintRulesI, NaryOperatorI, SpecialPreProcessorI
curNumberOfParameters, numberOfParameters| Constructor and Description |
|---|
MList() |
| Modifier and Type | Method and Description |
|---|---|
void |
append(Node node,
PrintVisitor pv)
Used to print the TensorNode with all its children.
|
protected void |
bufferAppend(MatrixNodeI node,
PrintVisitor pv,
int currank)
recursive procedure to print the tensor with lots of brackets.
|
MatrixValueI |
calcValue(MatrixValueI res,
MatrixValueI[] inputs)
Calculates the value of this node.
|
MatrixNodeI |
preprocess(ASTFunNode node,
MatrixPreprocessor visitor,
MatrixJep jep,
MatrixNodeFactory nf)
Subverts the preprocessing stage.
|
checkNumberOfParameters, checkStack, getNumberOfParameters, setCurNumberOfParametersclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcalcDimcheckNumberOfParameters, getNumberOfParameters, run, setCurNumberOfParameterspublic MatrixValueI calcValue(MatrixValueI res, MatrixValueI[] inputs) throws ParseException
VListcalcValue in interface NaryOperatorIcalcValue in class VListParseExceptionpublic MatrixNodeI preprocess(ASTFunNode node, MatrixPreprocessor visitor, MatrixJep jep, MatrixNodeFactory nf) throws ParseException
SpecialPreProcessorIMatrixNodeI children[] = visitor.visitChildrenAsArray(node,null);The final step is to construct a node of the correct type. The MatrixNodeFactory argument has a number of methods to do this. For example
return (ASTMFunNode) nf.buildOperatorNode(node.getOperator(),children,rhsDim);Note how the dimension is specified.
preprocess in interface SpecialPreProcessorInode - the top node of the tree representing the function and its arguments.visitor - A reference to the preprocessing visitor.jep - A reference of the MatrixJep instance.nf - A reference to the node factory object.ParseException - if some error occurs.protected void bufferAppend(MatrixNodeI node, PrintVisitor pv, int currank) throws ParseException
ParseExceptionpublic void append(Node node, PrintVisitor pv) throws ParseException
append in interface PrintVisitor.PrintRulesIParseExceptionCopyright © 2018. All rights reserved.