public class Doolittle extends java.lang.Object implements LUDecomposition
P.multiply(A) = L.multiply(U)
Not every non-singular matrix can be LU decomposed but some singular matrix can have valid LU decomposition.
For example, the following singular matrix has LU decomposition.
\[
\begin{bmatrix}
1 & 0 & 0\\
0 & 0 & 2\\
0 & 1 & -1
\end{bmatrix}
\]
On the other hand, the LU decomposition with pivoting always exists, even if the matrix is singular.| Constructor and Description |
|---|
Doolittle(Matrix A)
Run the Doolittle algorithm on a square matrix for LU decomposition.
|
Doolittle(Matrix A,
boolean usePivoting,
double epsilon)
Run the Doolittle algorithm on a square matrix for LU decomposition.
|
| 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.
|
public Doolittle(Matrix A, boolean usePivoting, double epsilon)
A - a square matrixusePivoting - true if partial pivoting is wanted, e.g., for numerical stabilityepsilon - a precision parameter: when a number |x| ≤ ε, it is considered 0java.lang.IllegalArgumentException - if A is not squarepublic Doolittle(Matrix A)
A - a square matrixjava.lang.IllegalArgumentException - if A is not squarepublic LowerTriangularMatrix L()
LUDecompositionL in interface LUDecompositionpublic UpperTriangularMatrix U()
LUDecompositionU in interface LUDecompositionpublic PermutationMatrix P()
LUDecompositionP in interface LUDecomposition