Class MatrixSplit

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

    public class MatrixSplit
    extends SDFTransformer
    This actor splits an input matrix into a sequence of matrices. This actor reads 1 input matrix and produces N*M output matrices, where N is the size of the rowSplit array, and M is the size of the columnSplit parameter. The matrices are produced from submatrices extracted left-to-right, top-to-bottom, in a raster scan pattern. For example, if rowSplit = {1, 2}, columnSplit = {2, 1}, and the input matrix is as follows:
       1  2  3
       4  5  6
       7  8  9
     
    then the first matrix out is a column vector:
       1
       4
     
    The second matrix out is
       2  3
       5  6
     
    The third is
       7
     
    (a 1x1 matrix) and the fourth is
       8  9
     
    a row vector. If the input does not have enough elements to fill the specified output matrices, then zeros (of the same type as the input elements) are used. If the input is larger than is required to fill the specified output, then the additional values are discarded.

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

      • columnSplit

        public Parameter columnSplit
        An array specifying the number of columns in the output matrices. This is an array of integers, with default {1}.
      • rowSplit

        public Parameter rowSplit
        An array specifying the number of rows in the output matrices. This is an array of integers, with default {1}.