Documentation of 'mikera.matrixx.Matrix33' Java class
Matrix33
mikera.matrixx

Class Matrix33

    • Field Detail

      • m00

        public double m00
      • m01

        public double m01
      • m02

        public double m02
      • m10

        public double m10
      • m11

        public double m11
      • m12

        public double m12
      • m20

        public double m20
      • m21

        public double m21
      • m22

        public double m22
    • Constructor Detail

      • Matrix33

        public Matrix33()
        Create a new (zero-initialised) 3x3 Matrix
      • Matrix33

        public Matrix33(Matrix33 source)
      • Matrix33

        public Matrix33(double m00,
                        double m01,
                        double m02,
                        double m10,
                        double m11,
                        double m12,
                        double m20,
                        double m21,
                        double m22)
      • Matrix33

        public Matrix33(AMatrix m)
    • Method Detail

      • determinant

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

        public long elementCount()
        Description copied from interface: INDArray
        Returns the total number of elements in this array. Equivalent to the product of all dimension sizes.
        Specified by:
        elementCount in interface INDArray
        Overrides:
        elementCount in class AMatrix
      • multiply

        public void multiply(double factor)
        Description copied from interface: INDArray
        Multiplies all elements of the array in place by a given double value
        Specified by:
        multiply in interface INDArray
        Overrides:
        multiply in class AMatrix
      • rowCount

        public int rowCount()
        Description copied from interface: IMatrix
        Gets the number of rows in this matrix (dimension 0)
        Specified by:
        rowCount in interface IMatrix
        Returns:
      • columnCount

        public int columnCount()
        Description copied from interface: IMatrix
        Gets the number of columns in this matrix (dimension 1)
        Specified by:
        columnCount in interface IMatrix
        Returns:
      • checkSquare

        public int checkSquare()
        Description copied from class: AMatrix
        Checks if a matrix is square. Returns the size if true, throws an exception otherwise;
        Specified by:
        checkSquare in class APrimitiveMatrix
        Returns:
      • get

        public double get(int row,
                          int column)
        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 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
        Specified by:
        set in class AMatrix
      • 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 AMatrix
      • innerProduct

        public AMatrix innerProduct(AMatrix a)
        Description copied from interface: IMatrix
        Computes the inner product of this matrix with another. Equivalent to matrix x matrix multiplication
        Specified by:
        innerProduct in interface IMatrix
        Overrides:
        innerProduct in class AMatrix
        Returns:
      • 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
      • transformNormal

        public void transformNormal(AVector source,
                                    AVector dest)
      • transformNormal

        public void transformNormal(Vector3 source,
                                    Vector3 dest)
      • transformInPlace

        public void transformInPlace(Vector3 dest)
      • isSymmetric

        public boolean isSymmetric()
        Description copied from class: AMatrix
        Returns true if a matrix is symmetric
        Specified by:
        isSymmetric in interface IMatrix
        Overrides:
        isSymmetric in class AMatrix
        Returns:
      • getTranspose

        public Matrix33 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 AMatrix
        Returns:
        the transpose of this matrix
      • 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
      • inverse

        public Matrix33 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.
      • 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 AMatrix
        Returns:
      • diagonalProduct

        public double diagonalProduct()
        Description copied from class: AMatrix
        Computes the product of entries on the main diagonal of a matrix
        Specified by:
        diagonalProduct in interface IMatrix
        Overrides:
        diagonalProduct in class AMatrix
        Returns:
      • clone

        public Matrix33 clone()
        Description copied from interface: INDArray
        Returns a clone of the array data, as a new array which will be fully mutable and may be of a different class to the original. Clone should attempt to return the most efficient possible array type. Clone should preserve sparsity property where possible, but this is not guaranteed.
        Specified by:
        clone in interface INDArray
        Overrides:
        clone in class AMatrix
      • toDoubleArray

        public double[] toDoubleArray()
        Description copied from interface: INDArray
        Copies the elements of this array to a new double[] array.
        Specified by:
        toDoubleArray in interface INDArray
        Overrides:
        toDoubleArray in class AMatrix
      • exactClone

        public Matrix33 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
      • getElements

        public void getElements(double[] data,
                                int offset)
        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
      • equals

        public boolean equals(java.lang.Object o)
        Overrides:
        equals in class AMatrix
      • equals

        public boolean equals(Matrix33 m)
      • createIdentityMatrix

        public static Matrix33 createIdentityMatrix()
      • createScaleMatrix

        public static Matrix33 createScaleMatrix(double d)
      • 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 AMatrix

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.