Class FastKroneckerProduct

    • Constructor Detail

      • FastKroneckerProduct

        public FastKroneckerProduct​(Matrix A,
                                    Matrix B)
        Construct a Kronecker product for read-only.
        Parameters:
        A - a matrix
        B - a matrix
    • Method Detail

      • nRows

        public int nRows()
        Description copied from interface: Table
        Gets the number of rows. Rows count from 1.
        Specified by:
        nRows in interface Table
        Returns:
        the number of rows
      • nCols

        public int nCols()
        Description copied from interface: Table
        Gets the number of columns. Columns count from 1.
        Specified by:
        nCols in interface Table
        Returns:
        the number of columns
      • set

        public void set​(int i,
                        int j,
                        double value)
                 throws MatrixAccessException
        Description copied from interface: MatrixAccess
        Set the matrix entry at [i,j] to a value. This is the only method that may change a matrix.
        Specified by:
        set in interface MatrixAccess
        Parameters:
        i - the row index
        j - the column index
        value - the value to set A[i,j] to
        Throws:
        MatrixAccessException - if i or j is out of range
      • multiply

        public Vector multiply​(Vector v)
        Description copied from interface: Matrix
        Right multiply this matrix, A, by a vector.
        Specified by:
        multiply in interface Matrix
        Parameters:
        v - a vector
        Returns:
        Av, a vector
      • scaled

        public Matrix scaled​(double scalar)
        Description copied from interface: Matrix
        Scale this matrix, A, by a constant.
        Specified by:
        scaled in interface Matrix
        Parameters:
        scalar - a double
        Returns:
        cA
      • ONE

        public DenseMatrix ONE()
        Description copied from interface: MatrixRing
        Get an identity matrix that has the same dimension as this matrix. For a non-square matrix, it zeros out the rows (columns) with index > nCols (nRows).
        Specified by:
        ONE in interface MatrixRing
        Specified by:
        ONE in interface Monoid<Matrix>
        Returns:
        an identity matrix
      • t

        public Matrix t()
        Description copied from interface: MatrixRing
        Get the transpose of this matrix. This is the involution on the matrix ring.
        Specified by:
        t in interface MatrixRing
        Returns:
        the transpose of this matrix