SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.algebra.linear.matrix.doubles.factorization.triangle

Class LU

• java.lang.Object
• com.numericalmethod.suanshu.algebra.linear.matrix.doubles.factorization.triangle.LU
• All Implemented Interfaces:
LUDecomposition

public class LU
extends Object
implements LUDecomposition
LU decomposition decomposes an n x n matrix A so that P * A = L * U. P is an n x n permutation matrix. L is an n x n lower triangular matrix. U is an n x n upper triangular matrix. That is,

P.multiply(A) == L.multiply(U)

See Also:
Wikipedia: LU decomposition
• Constructor Summary

Constructors
Constructor and Description
LU(Matrix A)
Run the LU decomposition on a square matrix.
LU(Matrix A, double epsilon)
Run the LU decomposition on a square matrix.
• Method Summary

All Methods
Modifier and Type Method and Description
LowerTriangularMatrix L()
Get the lower triangular matrix L as in the LU decomposition.
PermutationMatrix P()
Get the permutation matrix P as in P * A = L * U.
UpperTriangularMatrix U()
Get the upper triangular matrix U as in the LU decomposition.
• Methods inherited from class java.lang.Object

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

• LU

public LU(Matrix A,
double epsilon)
Run the LU decomposition on a square matrix.
Parameters:
A - a square matrix
epsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0
• LU

public LU(Matrix A)
Run the LU decomposition on a square matrix.
Parameters:
A - a matrix
• Method Detail

• L

public LowerTriangularMatrix L()
Description copied from interface: LUDecomposition
Get the lower triangular matrix L as in the LU decomposition.
Specified by:
L in interface LUDecomposition
Returns:
L
• U

public UpperTriangularMatrix U()
Description copied from interface: LUDecomposition
Get the upper triangular matrix U as in the LU decomposition.
Specified by:
U in interface LUDecomposition
Returns:
U
• P

public PermutationMatrix P()
Description copied from interface: LUDecomposition
Get the permutation matrix P as in P * A = L * U.
Specified by:
P in interface LUDecomposition
Returns:
P

Copyright © 2010-2018 Numerical Method Incorporation Limited. All Rights Reserved.