Class MatrixToSequence

  • All Implemented Interfaces:
    java.lang.Cloneable, Actor, Executable, FiringsRecordable, Initializable, SequenceActor, TypedActor, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class MatrixToSequence
    extends SDFTransformer
    This actor unbundles a matrix into a sequence of output tokens. On each firing, it writes the elements of the matrix to the output as a sequence of output tokens. It outputs the contents of the first row first, then the second row, etc. If the enforceMatrixSize parameter true, then if an input matrix does not match rows and columns parameters, then the fire() method will throw an exception. This feature is important in domains, such as SDF, that do static scheduling based on production and consumption rates. For other domains, such as DE and PN, the enforceMatrixSize parameter can be set to false, in which case the rows and columns parameters will be ignored. This actor is polymorphic. It can accept any matrix input and the output will have the type of the elements of the matrix.

    Since:
    Ptolemy II 0.4
    Version:
    $Id$
    Author:
    Edward Lee
    Pt.AcceptedRating:
    Red (neuendor)
    Pt.ProposedRating:
    Yellow (eal)
    • Field Detail

      • rows

        public Parameter rows
        The number of rows in the input. This is an integer that defaults to 1.
      • columns

        public Parameter columns
        The number of columns in the input. This is an integer that defaults to 1.
      • enforceMatrixSize

        public Parameter enforceMatrixSize
        If true, then enforce the rows and columns parameters by throwing an exception if it is violated. This is a boolean that defaults to true.