Documentation of 'org.jquantlib.math.matrixutilities.LUDecomposition' Java class
LUDecomposition
org.jquantlib.math.matrixutilities

Class LUDecomposition



  • public class LUDecomposition
    extends java.lang.Object
    LU Decomposition.

    For an m-by-n matrix A with m >= n, the LU decomposition is an m-by-n unit lower triangular matrix L, an n-by-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-by-m and U is m-by-n.

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

    See Also:
    JAMA
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      double det()
      Determinant
      int[] getPivot()
      Return pivot permutation vector
      boolean isNonSingular()
      Is the matrix nonsingular?
      Matrix L()
      Return lower triangular factor
      Matrix solve(Matrix B)
      Solve A*X = B
      Matrix U()
      Return upper triangular factor
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • LUDecomposition

        public LUDecomposition(Matrix A)
        LU Decomposition
        Parameters:
        A - is a rectangular matrix
    • Method Detail

      • isNonSingular

        public boolean isNonSingular()
        Is the matrix nonsingular?
        Returns:
        true if U, and hence A, is nonsingular.
      • L

        public Matrix L()
        Return lower triangular factor
        Returns:
        L
      • U

        public Matrix U()
        Return upper triangular factor
        Returns:
        U
      • getPivot

        public int[] getPivot()
        Return pivot permutation vector
        Returns:
        piv
      • det

        public double det()
        Determinant
        Returns:
        det(A)
        Throws:
        java.lang.IllegalArgumentException - Matrix must be square
      • solve

        public Matrix solve(Matrix B)
        Solve A*X = B
        Parameters:
        B - a Matrix with as many m as A and any number of columns.
        Returns:
        X so that L*U*X = B(piv,:)
        Throws:
        java.lang.IllegalArgumentException - Matrix row dimensions must agree.
        LibraryException - Matrix is singular.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.