Class ConjugateGradientNormalResidualSolver

  • All Implemented Interfaces:
    IterativeLinearSystemSolver

    public class ConjugateGradientNormalResidualSolver
    extends Object
    implements IterativeLinearSystemSolver
    For an under-determined system of linear equations, Ax = b, or when the coefficient matrix A is non-symmetric and nonsingular, the normal equation matrix AAt is symmetric and positive definite, and hence CG is applicable. Thus, the Conjugate Gradient Normal Residual method (CGNR) applies the Conjugate Gradient method (CG) to the normal equation
    (AtA)x = Atb
    The equivalent symmetric system has the form: \[ \begin{bmatrix} 0 & A\\ A' & 0 \end{bmatrix} \times \begin{bmatrix} Ax\\ x \end{bmatrix} = \begin{bmatrix} b\\ A'b \end{bmatrix} \] 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.

    • Field Detail

      • DEFAULT_RESIDUAL_REFRESH_RATE

        public static final int DEFAULT_RESIDUAL_REFRESH_RATE
        The algorithm recomputes the residual as b - Axi once per this number of iterations
        See Also:
        Constant Field Values
    • Constructor Detail

      • ConjugateGradientNormalResidualSolver

        public ConjugateGradientNormalResidualSolver​(PreconditionerFactory leftPreconditionerFactory,
                                                     int residualRefreshRate,
                                                     int maxIteration,
                                                     Tolerance tolerance)
        Construct a Conjugate Gradient Normal Residual method (CGNR) solver.
        Parameters:
        leftPreconditionerFactory - constructs a new left preconditioner
        residualRefreshRate - the number of iterations before the next refresh
        maxIteration - the maximum number of iterations
        tolerance - the convergence threshold
      • ConjugateGradientNormalResidualSolver

        public ConjugateGradientNormalResidualSolver​(int maxIteration,
                                                     Tolerance tolerance)
        Construct a Conjugate Gradient Normal Residual method (CGNR) solver.
        Parameters:
        maxIteration - the maximum number of iterations
        tolerance - the convergence threshold