|
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.matrixtype.sparse.solver.iterative.nonstationary.GeneralizedConjugateResidualSolver
public class GeneralizedConjugateResidualSolver
The Generalized Conjugate Residual method (GCR) is useful for solving non-symmetric n-by-n linear systems, like GMRES. GCR computes the next Krylov basis vector as a linear combination of the current residual and all previous basis vectors.
This solver implements a restarted version of GCR.
Only left preconditioning is supported in this implementation.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.solver.iterative.IterativeSolver |
|---|
IterativeSolver.ConvergenceFailure, IterativeSolver.Problem |
| Constructor Summary | |
|---|---|
GeneralizedConjugateResidualSolver()
Create a full GCR solver. |
|
GeneralizedConjugateResidualSolver(int m)
Create a restart version of GCR solver with the restart parameter m. |
|
| Method Summary | |
|---|---|
Vector |
solve(IterativeSolver.Problem problem)
Solve iteratively Ax = b until the solution is close enough, i.e., the norm of residual (b - Ax) is less than or equal to the specified iteration. |
Vector |
solve(IterativeSolver.Problem problem,
IterationMonitor monitor)
Solve iteratively Ax = b until the solution is close enough, i.e., the norm of residual (b - Ax) is less than or equal to the specified iteration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GeneralizedConjugateResidualSolver()
public GeneralizedConjugateResidualSolver(int m)
m.
m - the solver restarts for every m iterations| Method Detail |
|---|
public Vector solve(IterativeSolver.Problem problem)
throws IterativeSolver.ConvergenceFailure
IterativeSolverAx = buntil the solution is close enough, i.e., the norm of residual (b - Ax) is less than or equal to the specified iteration.
solve in interface IterativeSolverproblem - the problem of solving Ax = b
IterativeSolver.ConvergenceFailure - if the algorithm fails to converge
public Vector solve(IterativeSolver.Problem problem,
IterationMonitor monitor)
throws IterativeSolver.ConvergenceFailure
IterativeSolverAx = buntil the solution is close enough, i.e., the norm of residual (b - Ax) is less than or equal to the specified iteration.
In each iteration, the newly computed iterate is added to the
IterationMonitor for statistics or diagnostic purpose.
solve in interface IterativeSolverproblem - the problem of solving Ax = bmonitor - an IterationMonitor instance
IterativeSolver.ConvergenceFailure - if the algorithm fails to converge
|
SuanShu, a Java numerical and statistical library | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||