Package ptolemy.data.expr
Class ASTPtMatrixConstructNode
- java.lang.Object
-
- ptolemy.data.expr.ASTPtRootNode
-
- ptolemy.data.expr.ASTPtMatrixConstructNode
-
- All Implemented Interfaces:
java.lang.Cloneable
,Node
public class ASTPtMatrixConstructNode extends ASTPtRootNode
The parse tree created from the expression string consists of a hierarchy of node objects. This class represents matrix construction using Matlab like expressions.- Since:
- Ptolemy II 0.3
- Version:
- $Id$
- Author:
- Xiaojun Liu
- See Also:
ASTPtRootNode
,PtParser
,Token
- Pt.AcceptedRating:
- Red (cxh)
- Pt.ProposedRating:
- Yellow (nsmyth)
-
-
Field Summary
Fields Modifier and Type Field Description protected int
_form
The form of the matrix construction.protected int
_nColumns
The number of columns of the matrix construction.protected int
_nRows
The number of rows of the matrix construction.-
Fields inherited from class ptolemy.data.expr.ASTPtRootNode
_children, _id, _isConstant, _parent, _ptToken, _ptType
-
-
Constructor Summary
Constructors Constructor Description ASTPtMatrixConstructNode(int id)
ASTPtMatrixConstructNode(PtParser p, int id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getColumnCount()
int
getForm()
int
getRowCount()
void
visit(ParseTreeVisitor visitor)
Traverse this node with the given visitor.-
Methods inherited from class ptolemy.data.expr.ASTPtRootNode
clone, displayParseTree, evaluateParseTree, getToken, getType, isCongruent, isConstant, isEvaluated, jjtAddChild, jjtClose, jjtGetChild, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetParent, setConstant, setToken, setType, toString, toString
-
-
-
-
Field Detail
-
_nRows
protected int _nRows
The number of rows of the matrix construction.
-
_nColumns
protected int _nColumns
The number of columns of the matrix construction.
-
_form
protected int _form
The form of the matrix construction. _form is 1 when the matrix construction gives all elements. _form is 2 when using regularly spaced vector construction.
-
-
Constructor Detail
-
ASTPtMatrixConstructNode
public ASTPtMatrixConstructNode(int id)
-
ASTPtMatrixConstructNode
public ASTPtMatrixConstructNode(PtParser p, int id)
-
-
Method Detail
-
getColumnCount
public int getColumnCount()
-
getForm
public int getForm()
-
getRowCount
public int getRowCount()
-
visit
public void visit(ParseTreeVisitor visitor) throws IllegalActionException
Traverse this node with the given visitor.- Overrides:
visit
in classASTPtRootNode
- Parameters:
visitor
- The visitor.- Throws:
IllegalActionException
- Always thrown in this base class the visit() method is not implemented here.
-
-