|
Colt 1.2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cern.colt.matrix.linalg.LUDecomposition
For an m x n matrix A with m >= n, the LU decomposition is an m x n unit 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 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.
Constructor Summary | |
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. |
Method Summary | |
double |
det()
Returns the determinant, det(A). |
DoubleMatrix2D |
getL()
Returns the lower triangular factor, L. |
int[] |
getPivot()
Returns a copy of the pivot permutation vector. |
DoubleMatrix2D |
getU()
Returns the upper triangular factor, U. |
boolean |
isNonsingular()
Returns whether the matrix is nonsingular (has an inverse). |
DoubleMatrix2D |
solve(DoubleMatrix2D B)
Solves A*X = B. |
String |
toString()
Returns a String with (propertyName, propertyValue) pairs. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public LUDecomposition(DoubleMatrix2D A)
A
- Rectangular matrixMethod Detail |
public double det()
IllegalArgumentException
- Matrix must be squarepublic DoubleMatrix2D getL()
public int[] getPivot()
public DoubleMatrix2D getU()
public boolean isNonsingular()
public DoubleMatrix2D solve(DoubleMatrix2D B)
B
- A matrix with as many rows as A and any number of columns.
IllegalArgumentException
- if B.rows() != A.rows().
IllegalArgumentException
- if A is singular, that is, if !this.isNonsingular().
IllegalArgumentException
- if A.rows() < A.columns().public String toString()
rank : 3 trace : 0
|
Colt 1.2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |