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, copyChildren
public MatrixNodeFactory(XJep xj)
public ASTConstant buildConstantNode(Object value) throws ParseException
buildConstantNode
in class NodeFactory
ParseException
public ASTVarNode buildVariableNode(Variable var) throws ParseException
buildVariableNode
in class NodeFactory
ParseException
public ASTFunNode buildFunctionNode(String name, PostfixMathCommandI pfmc, Node[] arguments) throws ParseException
buildFunctionNode
in class NodeFactory
name
- of function.pfmc
- PostfixMathCommand for function.arguments
- the arguments to the function.ParseException
public Dimensions calcDim(String name, PostfixMathCommandI pfmc, Node[] arguments) throws ParseException
ParseException
public Dimensions calcDim(Operator op, Node[] arguments) throws ParseException
ParseException
public ASTFunNode buildFunctionNode(ASTFunNode node, Node[] children) throws ParseException
buildFunctionNode
in class NodeFactory
node
- the properties (name and pfmc) of this node will be copied.children
- the arguments to the function.ParseException
public ASTFunNode buildFunctionNode(ASTFunNode node, Node[] arguments, Dimensions dim)
public ASTFunNode buildOperatorNode(Operator op, Node[] arguments) throws ParseException
buildOperatorNode
in class NodeFactory
op
- the operator for this nodearguments
- the arguments to the function.ParseException
public ASTFunNode buildOperatorNode(Operator op, Node[] arguments, Dimensions dim)
public ASTFunNode buildUnfinishedOperatorNode(Operator op)
buildUnfinishedOperatorNode
in class NodeFactory
Jas4pp 1.5 © Java Analysis Studio for Particle Physics