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

Class StridedMatrix

    • Method Detail

      • create

        public static StridedMatrix create(int rowCount,
                                           int columnCount)
      • 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
      • getRow

        public AStridedVector 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 AStridedMatrix
      • getColumn

        public AStridedVector getColumn(int i)
        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 AStridedMatrix
      • 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
        Specified by:
        copyRowTo in class AStridedMatrix
        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
        Specified by:
        copyColumnTo in class AStridedMatrix
        dest - Destination double[] array
      • applyOp

        public void applyOp(Op op)
        Description copied from interface: INDArray
        Applies a unary operator to all elements of the array (in-place)
        Specified by:
        applyOp in interface INDArray
        Overrides:
        applyOp in class AStridedMatrix
      • getElements

        public void getElements(double[] dest,
                                int destOffset)
        Description copied from interface: INDArray
        Copies all elements of this array a double array at the specified offset
        Specified by:
        getElements in interface INDArray
        Overrides:
        getElements in class AMatrix
      • getTranspose

        public AStridedMatrix getTranspose()
        Description copied from interface: INDArray
        Returns the transpose of this array. A transpose of an array is equivalent to reversing the order of dimensions. May or may not return a view depending on the array type.
        Specified by:
        getTranspose in interface INDArray
        Specified by:
        getTranspose in interface IMatrix
        Overrides:
        getTranspose in class AStridedMatrix
        Returns:
        the transpose of this matrix
      • 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
      • 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
      • 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 AArrayMatrix
      • 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
      • wrap

        public static StridedMatrix wrap(double[] data,
                                         int rows,
                                         int columns,
                                         int offset,
                                         int rowStride,
                                         int columnStride)
      • validate

        public void validate()
        Description copied from interface: INDArray
        Validates the internal data structure of the INDArray. Throws an exception on failure. Failure indicates a serious bug and/or data corruption.
        Specified by:
        validate in interface INDArray
        Overrides:
        validate in class AMatrix
      • equals

        public boolean equals(AMatrix a)
        Description copied from class: AMatrix
        Returns true if this matrix is exactly equal to another matrix
        Overrides:
        equals in class AMatrix
      • equalsArray

        public boolean equalsArray(double[] data,
                                   int offset)
        Description copied from interface: INDArray
        Returns true if the elements in this array exactly match the elements in the given array, in row-major order
        Specified by:
        equalsArray in interface INDArray
        Overrides:
        equalsArray in class AMatrix
        Parameters:
        data - Array of double element values to check for equality
        offset - Offset into the data array
        Returns:

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.