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

Class IdentityMatrix

    • Method Detail

      • 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
        Specified by:
        isMutable in class ADiagonalMatrix
      • isBoolean

        public boolean isBoolean()
        Description copied from interface: INDArray
        Returns true if the array is boolean (contains only 0.0 or 1.0 values)
        Specified by:
        isBoolean in interface INDArray
        Overrides:
        isBoolean in class ADiagonalMatrix
      • 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 ADiagonalMatrix
      • rowDotProduct

        public double rowDotProduct(int i,
                                    AVector v)
        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 ADiagonalMatrix
        Returns:
      • 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
      • 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:
      • getRow

        public AxisVector 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 ADiagonalMatrix
      • getColumn

        public AxisVector 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
        Specified by:
        getColumn in interface IFastColumns
        Overrides:
        getColumn in class ADiagonalMatrix
      • getColumnView

        public AxisVector getColumnView(int column)
        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
      • set

        public void set(int row,
                        int column,
                        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 ADiagonalMatrix
      • 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
      • isIdentity

        public boolean isIdentity()
        Description copied from interface: IMatrix
        Checks if this is an identity matrix (i.e. 1.0 in leading diagonal, 0.0 elsewhere)
        Specified by:
        isIdentity in interface IMatrix
        Overrides:
        isIdentity in class ADiagonalMatrix
        Returns:
        true if this matrix is a square identity matrix, false otherwise.
      • isOrthogonal

        public boolean isOrthogonal()
        Description copied from class: AMatrix
        Check to see if the matrix is orthogonal (default tolerance: 1e-8)
        Overrides:
        isOrthogonal in class AMatrix
        Returns:
      • isOrthogonal

        public boolean isOrthogonal(double tolerance)
        Description copied from class: AMatrix
        Check to see if the matrix is orthogonal
        Overrides:
        isOrthogonal in class AMatrix
        Parameters:
        tolerance - inner product of a column with all of the next columns should be less than tolerance
        Returns:
      • inverse

        public AMatrix inverse()
        Description copied from class: AMatrix
        Computes the inverse of a matrix. Returns null if the matrix is singular. Throws an Exception is the matrix is not square
        Specified by:
        inverse in interface IMatrix
        Overrides:
        inverse in class AMatrix
        Returns:
        A matrix which is the inverse of this matrix, or null if the inverse does not exist.
      • determinant

        public double determinant()
        Description copied from class: AMatrix
        Calculates the determinant of the matrix.
        Overrides:
        determinant in class ADiagonalMatrix
      • rank

        public int rank()
        Description copied from class: AMatrix
        Calculate the rank of a matrix. This is equivalent to the maximum number of linearly independent rows or columns.
        Overrides:
        rank in class ADiagonalMatrix
      • 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 ADiagonalMatrix
      • 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 ADiagonalMatrix
      • trace

        public double trace()
        Description copied from interface: IMatrix
        Computes the trace of a matrix, i.e. the sum of all elements on the leading diagonal
        Specified by:
        trace in interface IMatrix
        Overrides:
        trace in class ADiagonalMatrix
        Returns:
      • multiplyCopy

        public ScalarMatrix multiplyCopy(double d)
        Description copied from interface: INDArray
        Returns a copy of the array with all elements multiplied by a single constant value
        Specified by:
        multiplyCopy in interface INDArray
        Overrides:
        multiplyCopy in class AMatrix
        Parameters:
        d - A scalar factor
        Returns:
        A new array, with all element values scaled by the given factor
      • exactClone

        public IdentityMatrix 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 ADiagonalMatrix
        Returns:
        A clone of the original array
      • hasUncountable

        public boolean hasUncountable()
        Description copied from class: AMatrix
        Checks to see if any element in the matrix is NaN of Infinite.
        Specified by:
        hasUncountable in interface INDArray
        Overrides:
        hasUncountable in class ADiagonalMatrix
        Returns:
        True if any element in the matrix is NaN of Infinite.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.