Documentation of 'org.spaceroots.mantissa.linalg.LowerTriangularMatrix' Java class
LowerTriangularMatrix
org.spaceroots.mantissa.linalg

Class LowerTriangularMatrix

  • All Implemented Interfaces:
    java.io.Serializable


    public class LowerTriangularMatrix
    extends SquareMatrix
    This class implements lower triangular matrices of linear algebra.
    See Also:
    Serialized Form
    • Constructor Detail

      • LowerTriangularMatrix

        public LowerTriangularMatrix(int order)
        Simple constructor. This constructor builds a lower triangular matrix of specified order, all elements being zeros.
        Parameters:
        order - order of the matrix
      • LowerTriangularMatrix

        public LowerTriangularMatrix(int order,
                                     double[] data)
        Simple constructor. Build a matrix with specified elements.
        Parameters:
        order - order of the matrix
        data - table of the matrix elements (stored row after row)
      • LowerTriangularMatrix

        public LowerTriangularMatrix(LowerTriangularMatrix l)
        Copy constructor.
        Parameters:
        l - lower triangular matrix to copy
    • Method Detail

      • duplicate

        public Matrix duplicate()
        Description copied from class: Matrix
        Polymorphic copy operator. This method build a new object of the same type of the instance. It is somewhat similar to the Object.clone() method, except that it has public access, it doesn't throw any specific exception and it returns a Matrix.
        Specified by:
        duplicate in class Matrix
        See Also:
        Object.clone()
      • setElement

        public void setElement(int i,
                               int j,
                               double value)
        Description copied from class: Matrix
        Set a matrix element.
        Overrides:
        setElement in class Matrix
        Parameters:
        i - row index, from 0 to rows - 1
        j - column index, from 0 to cols - 1
        value - value of the element
        See Also:
        Matrix.getElement(int, int)
      • selfAdd

        public void selfAdd(LowerTriangularMatrix l)
        Add a matrix to the instance. This method adds a matrix to the instance. It does modify the instance.
        Parameters:
        l - lower triangular matrix to add
        Throws:
        java.lang.IllegalArgumentException - if there is a dimension mismatch
      • selfSub

        public void selfSub(LowerTriangularMatrix l)
        Substract a matrix from the instance. This method substract a matrix from the instance. It does modify the instance.
        Parameters:
        l - lower triangular matrix to substract
        Throws:
        java.lang.IllegalArgumentException - if there is a dimension mismatch
      • getDeterminant

        public double getDeterminant(double epsilon)
        Description copied from class: SquareMatrix
        Get the determinant of the matrix.
        Specified by:
        getDeterminant in class SquareMatrix
        Parameters:
        epsilon - threshold on matrix elements below which the matrix is considered singular (this is used by the derived classes that use a factorization to compute the determinant)
        Returns:
        the determinant of the matrix
      • solve

        public Matrix solve(Matrix b,
                            double epsilon)
                     throws SingularMatrixException
        Description copied from class: SquareMatrix
        Solve the A.X = B equation.
        Specified by:
        solve in class SquareMatrix
        Parameters:
        b - second term of the equation
        epsilon - threshold on matrix elements below which the matrix is considered singular
        Returns:
        a matrix X such that A.X = B, where A is the instance
        Throws:
        SingularMatrixException - if the matrix is singular
      • getRangeForRow

        public org.spaceroots.mantissa.linalg.NonNullRange getRangeForRow(int i)
        Description copied from class: Matrix
        Set a range to the non null part covered by a row.
        Parameters:
        i - index of the row
        Returns:
        range of non nul elements in the specified row
        See Also:
        Matrix.getRangeForColumn(int)
      • getRangeForColumn

        public org.spaceroots.mantissa.linalg.NonNullRange getRangeForColumn(int j)
        Description copied from class: Matrix
        Set a range to the non null part covered by a column.
        Parameters:
        j - index of the column
        Returns:
        range of non nul elements in the specified column
        See Also:
        Matrix.getRangeForRow(int)

DataMelt 3.0 © DataMelt by jWork.ORG

Ads help maintain this website.