|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.numericalmethod.suanshu.matrix.doubles.linearsystem.LU
public class LU
Use the LU decomposition to solve
Ax = b
where A is square and det(A) != 0.
The dimensions of A and b must match.
That is,
Ax = b;
LUx = PAx = Pb
We first solve
Ly = b by forward substitution
then
Ux = y by backward substitution.
| Field Summary | |
|---|---|
LowerTriangularMatrix |
L
matrix L as in LUx = PAx = Pb |
PermutationMatrix |
P
matrix P as in LUx = PAx = Pb |
UpperTriangularMatrix |
U
matrix U as in LUx = PAx = Pb |
| Constructor Summary | |
|---|---|
LU(Matrix A)
Construct an LU instance to solve for different Vector b's. |
|
| Method Summary | |
|---|---|
Vector |
solve(Vector b)
Solve Ax = b |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final LowerTriangularMatrix L
L as in LUx = PAx = Pb
public final UpperTriangularMatrix U
U as in LUx = PAx = Pb
public final PermutationMatrix P
P as in LUx = PAx = Pb
| Constructor Detail |
|---|
public LU(Matrix A)
Vector b's.
A - a matrix A as in Ax = b
Solver.NoSolution - if there is no solution to this system| Method Detail |
|---|
public Vector solve(Vector b)
Ax = b
b - a vector
Ax = b
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||