public class QuasiMinimalResidualSolver extends Object implements IterativeLinearSystemSolver
IterativeLinearSystemSolver.Solution
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_RESIDUAL_REFRESH_RATE
The algorithm recomputes the residual as b - Axi once per this number of
iterations
|
Constructor and Description |
---|
QuasiMinimalResidualSolver(int maxIteration,
Tolerance tolerance)
Construct a Quasi-Minimal Residual (QMR) solver.
|
QuasiMinimalResidualSolver(PreconditionerFactory leftPreconditionerFactory,
PreconditionerFactory rightPreconditionerFactory,
int residualRefreshRate,
int maxIteration,
Tolerance tolerance)
Construct a Quasi-Minimal Residual (QMR) solver.
|
Modifier and Type | Method and Description |
---|---|
IterativeLinearSystemSolver.Solution |
solve(LSProblem problem) |
IterativeLinearSystemSolver.Solution |
solve(LSProblem problem,
IterationMonitor<Vector> monitor)
Solves iteratively
Ax = b
until the solution converges, i.e., the norm of residual
(b - Ax) is less than or equal to the threshold.
|
public static final int DEFAULT_RESIDUAL_REFRESH_RATE
public QuasiMinimalResidualSolver(PreconditionerFactory leftPreconditionerFactory, PreconditionerFactory rightPreconditionerFactory, int residualRefreshRate, int maxIteration, Tolerance tolerance)
leftPreconditionerFactory
- constructs a new left preconditionerrightPreconditionerFactory
- constructs a new right preconditionerresidualRefreshRate
- the number of iterations before the next refreshmaxIteration
- the maximum number of iterationstolerance
- the convergence thresholdpublic QuasiMinimalResidualSolver(int maxIteration, Tolerance tolerance)
maxIteration
- the maximum number of iterationstolerance
- the convergence thresholdpublic IterativeLinearSystemSolver.Solution solve(LSProblem problem) throws ConvergenceFailure
ConvergenceFailure
public IterativeLinearSystemSolver.Solution solve(LSProblem problem, IterationMonitor<Vector> monitor) throws ConvergenceFailure
IterativeLinearSystemSolver
Ax = buntil the solution converges, i.e., the norm of residual (b - Ax) is less than or equal to the threshold.
solve
in interface IterativeLinearSystemSolver
problem
- a system of linear equationsmonitor
- an iteration monitorConvergenceFailure
- if the algorithm fails to convergeCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.