Documentation of 'mikera.matrixx.impl.SubMatrixView' Java class
SubMatrixView
mikera.matrixx.impl

Class SubMatrixView

    • Constructor Detail

      • SubMatrixView

        public SubMatrixView(AMatrix source,
                             int rowStart,
                             int colStart,
                             int rows,
                             int cols)
    • Method Detail

      • get

        public double get(int i,
                          int j)
        Description copied from interface: INDArray
        Returns the double value at the specified position in a 2D matrix
        Specified by:
        get in interface INDArray
        Specified by:
        get in interface IMatrix
        Specified by:
        get in class AMatrix
      • set

        public void set(int i,
                        int j,
                        double value)
        Description copied from interface: INDArray
        Sets a value at a given position in a mutable 2D array
        Specified by:
        set in interface INDArray
        Specified by:
        set in interface IMatrix
        Overrides:
        set in class ARectangularMatrix
      • unsafeGet

        public double unsafeGet(int i,
                                int j)
        Description copied from class: AMatrix
        Gets an element in the matrix in an unsafe fashion, without performing bound checks The result is undefined if the row and column are out of bounds.
        Overrides:
        unsafeGet in class AMatrix
        Returns:
      • unsafeSet

        public void unsafeSet(int i,
                              int j,
                              double value)
        Description copied from class: AMatrix
        Sets an element value in the matrix in an unsafe fashion, without performing bound checks The result is undefined if the row and column are out of bounds.
        Overrides:
        unsafeSet in class AMatrix
      • isFullyMutable

        public boolean isFullyMutable()
        Description copied from interface: INDArray
        If this method returns true, the INDArray is guaranteed to be fully mutable in all positions i.e. every position can store any valid double value
        Specified by:
        isFullyMutable in interface INDArray
        Specified by:
        isFullyMutable in class AMatrix
      • isMutable

        public boolean isMutable()
        Description copied from interface: INDArray
        Returns true if the INDArray is mutable (at least partially)
        Specified by:
        isMutable in interface INDArray
        Overrides:
        isMutable in class AMatrix
      • exactClone

        public AMatrix exactClone()
        Description copied from interface: INDArray
        Creates a deep clone of an array, using the same class implementation as the original array
        Specified by:
        exactClone in interface INDArray
        Specified by:
        exactClone in class AMatrix
        Returns:
        A clone of the original array
      • asVector

        public AVector asVector()
        Description copied from class: AMatrix
        Returns the matrix values as a single reference Vector in the form [row0 row1 row2....]
        Specified by:
        asVector in interface INDArray
        Overrides:
        asVector in class AMatrix
      • getRow

        public AVector getRow(int i)
        Description copied from interface: IMatrix
        Returns a row of the matrix. May or may not be a view, depending on matrix type. Intended for the fastest possible read access of the row. This often means a view, but might not be (e.g. getRow on a Matrix33 returns a Vector3).
        Specified by:
        getRow in interface IMatrix
        Overrides:
        getRow in class AMatrix
      • getColumn

        public AVector getColumn(int j)
        Description copied from interface: IMatrix
        Returns a column of the matrix. May or may not be a view, depending on matrix type. Intended for the fastest possible read access of the column. This often means a view, but might not be (e.g. getColumn on a Matrix33 returns a Vector3).
        Specified by:
        getColumn in interface IMatrix
        Overrides:
        getColumn in class AMatrix
      • getRowView

        public AVector getRowView(int i)
        Description copied from interface: IMatrix
        Returns a row of the matrix as a vector view. May be used to modify the original matrix.
        Specified by:
        getRowView in interface IMatrix
        Overrides:
        getRowView in class AMatrix
      • getColumnView

        public AVector getColumnView(int j)
        Description copied from interface: IMatrix
        Returns a column of the matrix as a vector view. May be used to modify the original matrix.
        Specified by:
        getColumnView in interface IMatrix
        Overrides:
        getColumnView in class AMatrix
      • getRowClone

        public AVector getRowClone(int i)
        Description copied from interface: IMatrix
        Returns a row of the matrix as a new cloned, mutable vector. The cloned row may be modified without affecting the original matrix.
        Specified by:
        getRowClone in interface IMatrix
        Overrides:
        getRowClone in class AMatrix
      • getColumnClone

        public AVector getColumnClone(int j)
        Description copied from interface: IMatrix
        Returns a column of the matrix as a new cloned, mutable vector The cloned column may be modified without affecting the original matrix.
        Specified by:
        getColumnClone in interface IMatrix
        Overrides:
        getColumnClone in class AMatrix
      • copyRowTo

        public void copyRowTo(int row,
                              double[] dest,
                              int destOffset)
        Description copied from class: AMatrix
        Copies the elements in a selected row of this matrix to a double array
        Overrides:
        copyRowTo in class AMatrix
        Parameters:
        row - The index of the selected row
        dest - Destination double[] array
        destOffset - Offset into destination array
      • copyColumnTo

        public void copyColumnTo(int col,
                                 double[] dest,
                                 int destOffset)
        Description copied from class: AMatrix
        Copies the elements in a selected row of this matrix to a double array
        Overrides:
        copyColumnTo in class AMatrix
        dest - Destination double[] array

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.