ptolemy.data.expr
Class ConcreteMatrixToken

java.lang.Object
  extended by ptolemy.data.Token
      extended by ptolemy.data.MatrixToken
          extended by ptolemy.data.expr.ConcreteMatrixToken
All Implemented Interfaces:
java.io.Serializable

public class ConcreteMatrixToken
extends MatrixToken

A token that represents an empty matrix, with no element type. This is instantiated by the Constants class with name "matrix".

Since:
Ptolemy II 2.0
Version:
$Id: ConcreteMatrixToken.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Edward A. Lee
See Also:
Constants, Serialized Form
Accepted Rating:
Yellow (wbwu)
Proposed Rating:
Yellow (yuhong)

Field Summary
 
Fields inherited from class ptolemy.data.MatrixToken
_nils, DO_COPY, DO_NOT_COPY
 
Fields inherited from class ptolemy.data.Token
NIL
 
Constructor Summary
ConcreteMatrixToken()
           
 
Method Summary
 int getColumnCount()
          Return the number of columns of the contained matrix.
 Token getElementAsToken(int row, int column)
          Throw an ArrayIndexOutOfBoundsException.
 Type getElementType()
          Return the Type of the tokens contained in this matrix token.
 int getRowCount()
          Return the number of rows of the contained matrix.
 Type getType()
          Return the type of this token.
 
Methods inherited from class ptolemy.data.MatrixToken
_add, _addElement, _divideElement, _elementIsNil, _isCloseTo, _isEqualTo, _moduloElement, _multiply, _multiplyElement, _subtract, _subtractElement, _subtractElementReverse, add, addReverse, arrayToMatrix, arrayToMatrix, arrayToMatrixReturnType, booleanMatrix, complexMatrix, create, createSequence, createSequenceReturnType, createTokenSequence, crop, determineSequenceLength, divide, divideReverse, doubleMatrix, fixMatrix, intMatrix, isCloseTo, isEqualTo, join, longMatrix, matrixToArray, matrixToArrayReturnType, modulo, moduloReverse, multiply, multiplyReverse, oneRight, split, subtract, subtractReverse, toArray, toArrayColumnMajor, toArrayReturnType, toString
 
Methods inherited from class ptolemy.data.Token
isCloseTo, isNil, notSupportedConversionMessage, notSupportedIncomparableConversionMessage, notSupportedIncomparableMessage, notSupportedMessage, notSupportedNullNilStringMessage, one, pow, zero, zeroReturnType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConcreteMatrixToken

public ConcreteMatrixToken()
Method Detail

getColumnCount

public int getColumnCount()
Return the number of columns of the contained matrix.

Specified by:
getColumnCount in class MatrixToken
Returns:
Zero.

getElementAsToken

public Token getElementAsToken(int row,
                               int column)
                        throws java.lang.ArrayIndexOutOfBoundsException
Throw an ArrayIndexOutOfBoundsException.

Specified by:
getElementAsToken in class MatrixToken
Parameters:
row - The row index of the desired element.
column - The column index of the desired element.
Returns:
An exception.
Throws:
java.lang.ArrayIndexOutOfBoundsException - Always thrown.

getElementType

public Type getElementType()
Return the Type of the tokens contained in this matrix token.

Specified by:
getElementType in class MatrixToken
Returns:
A Type.

getRowCount

public int getRowCount()
Return the number of rows of the contained matrix.

Specified by:
getRowCount in class MatrixToken
Returns:
Zero.

getType

public Type getType()
Return the type of this token.

Overrides:
getType in class Token
Returns:
BaseType.MATRIX.