|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.lsmp.djep.xjep.NodeFactory
org.lsmp.djep.matrixJep.MatrixNodeFactory
public class MatrixNodeFactory
This class is used to create nodes of specified types. It can be sub-classed to change the nature of how nodes are constructed. Generally there are two methods for creating nodes, methods which take an existing node and methods which take the components.
| Constructor Summary | |
|---|---|
MatrixNodeFactory(XJep xj)
|
|
| Method Summary | |
|---|---|
ASTConstant |
buildConstantNode(java.lang.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(java.lang.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(java.lang.String name,
PostfixMathCommandI pfmc,
Node[] arguments)
Calculates the dimension of node using the dimensions of the children. |
| Methods inherited from class org.lsmp.djep.xjep.NodeFactory |
|---|
buildConstantNode, buildConstantNode, buildConstantNode, buildConstantNode, buildConstantNode, buildOperatorNode, buildOperatorNode, buildVariableNode, buildVariableNode, copyChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MatrixNodeFactory(XJep xj)
| Method Detail |
|---|
public ASTConstant buildConstantNode(java.lang.Object value)
throws ParseException
buildConstantNode in class NodeFactoryParseException
public ASTVarNode buildVariableNode(Variable var)
throws ParseException
buildVariableNode in class NodeFactoryParseException
public ASTFunNode buildFunctionNode(java.lang.String name,
PostfixMathCommandI pfmc,
Node[] arguments)
throws ParseException
buildFunctionNode in class NodeFactoryname - of function.pfmc - PostfixMathCommand for function.arguments - the arguments to the function.
ParseException
public Dimensions calcDim(java.lang.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 NodeFactorynode - 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 NodeFactoryop - 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
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||