public class ConjugateGradientNormalErrorSolver extends Object implements IterativeLinearSystemSolver
(AAt)y = bfor y, and then computes the solution
x = AtyThe equivalent symmetric system has the form: \[ \begin{bmatrix} I & A\\ A' & 0 \end{bmatrix} \times \begin{bmatrix} r\\ x \end{bmatrix} = \begin{bmatrix} b\\ 0 \end{bmatrix} \] with r = b - Ax arising from the standard necessary conditions satisfied by the solution of the constrained optimization problem, \[ \min \left \| r - b \right \|^2 \textup{ s.t., } A'r = 0 \] The convergence may be slow as the spectrum of AAt will be less favorable than the spectrum of A. Only left preconditioning is supported in this implementation.
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 |
|---|
ConjugateGradientNormalErrorSolver(int maxIteration,
Tolerance tolerance)
Construct a Conjugate Gradient Normal Error (CGNE) solver.
|
ConjugateGradientNormalErrorSolver(PreconditionerFactory leftPreconditionerFactory,
int residualRefreshRate,
int maxIteration,
Tolerance tolerance)
Construct a Conjugate Gradient Normal Error (CGNE) 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 ConjugateGradientNormalErrorSolver(PreconditionerFactory leftPreconditionerFactory, int residualRefreshRate, int maxIteration, Tolerance tolerance)
leftPreconditionerFactory - constructs a new left preconditionerresidualRefreshRate - the number of iterations before the next refreshmaxIteration - the maximum number of iterationstolerance - the convergence thresholdpublic ConjugateGradientNormalErrorSolver(int maxIteration,
Tolerance tolerance)
maxIteration - the maximum number of iterationstolerance - the convergence thresholdpublic IterativeLinearSystemSolver.Solution solve(LSProblem problem) throws ConvergenceFailure
ConvergenceFailurepublic IterativeLinearSystemSolver.Solution solve(LSProblem problem, IterationMonitor<Vector> monitor) throws ConvergenceFailure
IterativeLinearSystemSolverAx = buntil the solution converges, i.e., the norm of residual (b - Ax) is less than or equal to the threshold.
solve in interface IterativeLinearSystemSolverproblem - a system of linear equationsmonitor - an iteration monitorConvergenceFailure - if the algorithm fails to convergeCopyright © 2010-2020 NM FinTech Ltd.. All Rights Reserved.