public class Doolittle extends 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.
With (partial) pivoting, rows may be swapped during the decomposition process to avoid division
by zero, and hence make the process more numerically stable.Constructor and Description |
---|
Doolittle(Matrix A)
Runs Doolittle algorithm on a square matrix for LU decomposition.
|
Doolittle(Matrix A,
boolean usePivoting)
Runs Doolittle algorithm on a square matrix for LU decomposition.
|
Doolittle(Matrix A,
boolean usePivoting,
double epsilon)
Runs Doolittle algorithm on a square matrix for LU decomposition.
|
Doolittle(Matrix A,
double epsilon)
Runs 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)
A
- the square matrixpublic Doolittle(Matrix A, double epsilon)
A
- the square matrixepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered 0public Doolittle(Matrix A, boolean usePivoting)
A
- the square matrixusePivoting
- true
if (partial) pivoting is usedpublic Doolittle(Matrix A, boolean usePivoting, double epsilon)
A
- the square matrixusePivoting
- true
if (partial) pivoting is usedepsilon
- a precision parameter: when a number |x| ≤ ε, it is considered
0public LowerTriangularMatrix L()
LUDecomposition
L
in interface LUDecomposition
public UpperTriangularMatrix U()
LUDecomposition
U
in interface LUDecomposition
public PermutationMatrix P()
LUDecomposition
P
in interface LUDecomposition
Copyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.