|
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.BackwardSubstitution
public class BackwardSubstitution
Backward substitution solves a matrix equation in the form
Ux = b
by an iterative process for an upper triangular matrix U.
The process is so called because for an upper triangular matrix, one first computes xn, then substitutes that backward into the next equation to solve for xn-1, and repeats onto x1.
Note that some diagonal entries in U can be 0s, provided that the system of equations is consistent.
E.g.,
| 1 2 3 | | 10 | | 10 |
| 0 0 5 | %*% | 0 | = | 0 |
| 0 0 0 | | 0 | | 0 |
| Field Summary | |
|---|---|
UpperTriangularMatrix |
U
the system of linear equations (the homogeneous part) |
| Constructor Summary | |
|---|---|
BackwardSubstitution(UpperTriangularMatrix U)
Construct a BackwardSubstitution instance to solve for different Vector b's. |
|
| Method Summary | |
|---|---|
Vector |
solve(Vector b)
Solve Ux = b |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final UpperTriangularMatrix U
| Constructor Detail |
|---|
public BackwardSubstitution(UpperTriangularMatrix U)
Vector b's.
U - an upper triangular matrix| Method Detail |
|---|
public Vector solve(Vector b)
Ux = b
b - a vector
Ux = 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 | |||||||