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

Class ADenseArrayMatrix

    • Method Detail

      • isZero

        public boolean isZero()
        Description copied from class: AMatrix
        Returns true if the matrix is the zero matrix (all components zero)
        Specified by:
        isZero in interface INDArray
        Overrides:
        isZero in class AStridedMatrix
      • isUpperTriangular

        public boolean isUpperTriangular()
        Description copied from class: AMatrix
        Returns true if a matrix is upper triangular An upper triangular matrix is defined as having all elements equal to 0.0 where i > j
        Overrides:
        isUpperTriangular in class AMatrix
      • isLowerTriangular

        public boolean isLowerTriangular()
        Description copied from class: AMatrix
        Returns true if a matrix is lower triangular. A lower triangular matrix is defined as having all elements equal to 0.0 where i < j
        Overrides:
        isLowerTriangular in class AMatrix
      • rowStride

        public int rowStride()
        Description copied from class: AStridedMatrix
        Gets the row stride for this strided matrix. Each row has this offset in the underlying data array vs. the previous row. May be positive, zero or negative.
        Specified by:
        rowStride in class AStridedMatrix
      • columnStride

        public int columnStride()
        Description copied from class: AStridedMatrix
        Gets the column stride for this strided matrix. Each column has this offset in the underlying data array vs. the previous column. May be positive, zero or negative.
        Specified by:
        columnStride in class AStridedMatrix
      • 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 AArrayMatrix
        Returns:
      • set

        public void set(AVector v)
        Description copied from class: AMatrix
        Sets every row of this matrix with the element values from a vector.
        Overrides:
        set in class AMatrix
      • set

        public void set(AMatrix m)
        Description copied from class: AMatrix
        Sets this matrix with the element values from another matrix. Source matrix must have the same shape.
        Overrides:
        set in class AMatrix
      • setElements

        public void setElements(double[] values,
                                int offset)
        Description copied from interface: INDArray
        Sets all elements in an array using the given double values
        Specified by:
        setElements in interface INDArray
        Overrides:
        setElements in class AMatrix
        Parameters:
        values - Element values in a double[] array. There must be at least as many element values as elements in this array.
        offset - Position in the values array from which to start taking values.
      • setElements

        public void setElements(int pos,
                                double[] values,
                                int offset,
                                int length)
        Description copied from interface: INDArray
        Sets elements in an array using the given double values. The source array must contain at least the specified length in terms of number of elements
        Specified by:
        setElements in interface INDArray
        Overrides:
        setElements in class AbstractArray<AVector>
        Parameters:
        pos - Offset into this array, expressed in terms of number of elements in row major order
        values - Element values in a double[] array. There must be at least as many element values as elements in this array.
        offset - Position in the values array from which to start taking values.
        length - Number of elements to set.
      • getRow

        public ADenseArrayVector 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
        Specified by:
        getRow in interface IFastRows
        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
      • setRow

        public void setRow(int i,
                           AVector row)
        Description copied from class: AMatrix
        Sets a row in a matrix to the value specified by the given vector
        Overrides:
        setRow in class AMatrix
      • elementSum

        public double elementSum()
        Description copied from class: AMatrix
        Returns the sum of all elements in this matrix
        Specified by:
        elementSum in interface INDArray
        Overrides:
        elementSum in class AMatrix
      • elementMax

        public double elementMax()
        Description copied from interface: INDArray
        Returns the maximum element value in this array. Throws an error if there are no elements.
        Specified by:
        elementMax in interface INDArray
        Overrides:
        elementMax in class AbstractArray<AVector>
      • elementMin

        public double elementMin()
        Description copied from interface: INDArray
        Returns the maximum element value in this array. Throws an error if there are no elements.
        Specified by:
        elementMin in interface INDArray
        Overrides:
        elementMin in class AbstractArray<AVector>
      • 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
      • 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
      • transform

        public void transform(AVector source,
                              AVector dest)
        Description copied from interface: IMatrix
        Transforms a source vector into a destination vector, using matrix multiplication (inner product). The destination vector is overwritten.
        Specified by:
        transform in interface IMatrix
        Overrides:
        transform in class AMatrix
      • add

        public void add(AVector v)
        Description copied from class: AMatrix
        Adds a vector to every row of this matrix.
        Overrides:
        add in class AStridedMatrix
      • add

        public void add(AMatrix a)
        Description copied from class: AMatrix
        Adds another matrix to this matrix. Matrices must be the same size.
        Overrides:
        add in class AStridedMatrix
      • addToArray

        public void addToArray(double[] data,
                               int offset)
        Description copied from interface: INDArray
        Adds all the elements of this array to a double array at the specified offset, in row-major order
        Specified by:
        addToArray in interface INDArray
        Overrides:
        addToArray in class AStridedMatrix
      • reduce

        public double reduce(Op2 op,
                             double init)
        Description copied from interface: INDArray
        Reduces over all elements of the array in row-major order. Applies the operator to the initial/previous result at each step. Returns the final result.
        Specified by:
        reduce in interface INDArray
        Overrides:
        reduce in class AStridedMatrix
      • rowDotProduct

        public double rowDotProduct(int i,
                                    AVector a)
        Description copied from class: AMatrix
        Returns the dot product of a specific row with a vector. Unsafe operation: performs no bounds checking
        Overrides:
        rowDotProduct in class AStridedMatrix
        Returns:
      • 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
      • equals

        public boolean equals(INDArray a)
        Description copied from interface: INDArray
        Checks if two arrays are equal exactly in terms of both value and shape Element equality checks are consistent with compareTo
        Specified by:
        equals in interface INDArray
        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.