public class MatrixNodeFactory extends NodeFactory
| Constructor and Description |
|---|
MatrixNodeFactory(XJep xj) |
| Modifier and Type | Method and Description |
|---|---|
ASTConstant |
buildConstantNode(Object value)
Creates an ASTConstant node with specified value.
|
ASTFunNode |
buildFunctionNode(ASTFunNode node,
Node[] children)
Builds a function with n arguments
|
ASTFunNode |
buildFunctionNode(ASTFunNode node,
Node[] arguments,
Dimensions dim)
create a function node with a known dimension
|
ASTFunNode |
buildFunctionNode(String name,
PostfixMathCommandI pfmc,
Node[] arguments)
Builds a function with n arguments
|
ASTFunNode |
buildOperatorNode(Operator op,
Node[] arguments)
Builds a operator node with n arguments
|
ASTFunNode |
buildOperatorNode(Operator op,
Node[] arguments,
Dimensions dim)
create a function node with a known dimension
|
ASTFunNode |
buildUnfinishedOperatorNode(Operator op)
Creates an operator node, but don't fill in the children or calculate
its dimension.
|
ASTVarNode |
buildVariableNode(Variable var)
Creates a ASTVariable node with specified value.
|
Dimensions |
calcDim(Operator op,
Node[] arguments)
Calculates the dimension of node using the dimensions
of the children.
|
Dimensions |
calcDim(String name,
PostfixMathCommandI pfmc,
Node[] arguments)
Calculates the dimension of node using the dimensions
of the children.
|
buildConstantNode, buildConstantNode, buildConstantNode, buildConstantNode, buildConstantNode, buildOperatorNode, buildOperatorNode, buildVariableNode, buildVariableNode, copyChildrenpublic MatrixNodeFactory(XJep xj)
public ASTConstant buildConstantNode(Object value) throws ParseException
buildConstantNode in class NodeFactoryParseExceptionpublic ASTVarNode buildVariableNode(Variable var) throws ParseException
buildVariableNode in class NodeFactoryParseExceptionpublic ASTFunNode buildFunctionNode(String name, PostfixMathCommandI pfmc, Node[] arguments) throws ParseException
buildFunctionNode in class NodeFactoryname - of function.pfmc - PostfixMathCommand for function.arguments - the arguments to the function.ParseExceptionpublic Dimensions calcDim(String name, PostfixMathCommandI pfmc, Node[] arguments) throws ParseException
ParseExceptionpublic Dimensions calcDim(Operator op, Node[] arguments) throws ParseException
ParseExceptionpublic ASTFunNode buildFunctionNode(ASTFunNode node, Node[] children) throws ParseException
buildFunctionNode in class NodeFactorynode - the properties (name and pfmc) of this node will be copied.children - the arguments to the function.ParseExceptionpublic ASTFunNode buildFunctionNode(ASTFunNode node, Node[] arguments, Dimensions dim)
public ASTFunNode buildOperatorNode(Operator op, Node[] arguments) throws ParseException
buildOperatorNode in class NodeFactoryop - the operator for this nodearguments - the arguments to the function.ParseExceptionpublic ASTFunNode buildOperatorNode(Operator op, Node[] arguments, Dimensions dim)
public ASTFunNode buildUnfinishedOperatorNode(Operator op)
buildUnfinishedOperatorNode in class NodeFactoryCopyright © 2018. All rights reserved.