LUDecomposition
cern.colt.matrix.linalg

Class LUDecomposition

  • All Implemented Interfaces:
    Serializable


    public class LUDecompositionextends Objectimplements Serializable
    For an m x n matrix A with m >= n, the LU decomposition is an m x nunit lower triangular matrix L, an n x n upper triangular matrix U,and a permutation vector piv of length m so that A(piv,:) = L*U;If m < n, then L is m x m and U is m x n.

    The LU decomposition with pivoting always exists, even if the matrix issingular, so the constructor will never fail. The primary use of theLU decomposition is in the solution of square systems of simultaneouslinear equations. This will fail if isNonsingular() returns false.

    See Also:
    Serialized Form
    • Constructor Detail

      • LUDecomposition

        public LUDecomposition(DoubleMatrix2D A)
        Constructs and returns a new LU Decomposition object; The decomposed matrices can be retrieved via instance methods of the returned decomposition object.
        Parameters:
        A - Rectangular matrix
    • Method Detail

      • getL

        public DoubleMatrix2D getL()
        Returns the lower triangular factor, L.
        Returns:
        L
      • getPivot

        public int[] getPivot()
        Returns a copy of the pivot permutation vector.
        Returns:
        piv
      • getU

        public DoubleMatrix2D getU()
        Returns the upper triangular factor, U.
        Returns:
        U
      • isNonsingular

        public boolean isNonsingular()
        Returns whether the matrix is nonsingular (has an inverse).
        Returns:
        true if U, and hence A, is nonsingular; false otherwise.
      • toString

        public String toString()
        Returns a String with (propertyName, propertyValue) pairs.Useful for debugging or to quickly get the rough picture.For example,
        rank          : 3trace         : 0
        Overrides:
        toString in class Object

SCaVis 2.0 © jWork.ORG