|
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.ForwardSubstitution
public class ForwardSubstitution
Forward substitution solves a matrix equation in the form
Lx = b
by an iterative process for a lower triangular matrix L.
The process is so called because for a lower triangular matrix, one first computes x1, then substitutes that forward into the next equation to solve for x2, and repeats onto xn.
Note that some diagonal entries in L can be 0s, provided that the system of equations is consistent.
E.g.,
| 0 0 0 | | 0 | | 0 |
| 2 0 0 | %*% | 0 | = | 0 |
| 4 5 6 | | 30 | | 30 |
| Field Summary | |
|---|---|
LowerTriangularMatrix |
L
the system of linear equations (the homogeneous part) |
| Constructor Summary | |
|---|---|
ForwardSubstitution(LowerTriangularMatrix L)
Construct a ForwardSubstitution instance to solve for different Vector b's. |
|
| Method Summary | |
|---|---|
Vector |
solve(Vector b)
Solve Lx = 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
| Constructor Detail |
|---|
public ForwardSubstitution(LowerTriangularMatrix L)
Vector b's.
L - a lower triangular matrix| Method Detail |
|---|
public Vector solve(Vector b)
Lx = b
b - a vector
Lx = b
Solver.NoSolution - if there is no solution to this system
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||