Module ojalgo

Class QMRSolver

  • All Implemented Interfaces:
    MatrixTask<java.lang.Double>, SolverTask<java.lang.Double>

    public final class QMRSolver
    extends IterativeSolverTask
    Quasi-Minimal Residual (QMR) solver for general nonsymmetric square systems.

    This is a Java port of SciPy's qmr() reference implementation. It is almost a straight line-by-line translation from SciPy. Implemented here with right-preconditioning only (M1 = I, M2 != I), and using ojAlgo's dense MatrixStore operations for matrix–vector products with A and A^T.

    Characteristics

    • Operates on matrix–vector products with both A and A^T.
    • Right-preconditioning is used; both forward and transpose applications of the preconditioner may be invoked.
    • Stops when the residual norm is small relative to the RHS norm (or absolutely small when RHS is zero), or when the iteration limit is reached.
    When to use
    • For nonsymmetric or indefinite problems where SPD-specific methods are inapplicable.
    • When a robust Krylov method is preferred over simple stationary iterations.
    • If A^T is unavailable or too costly, consider alternatives that avoid explicit transpose products.
    References
    • Templates for the Solution of Linear Systems, Barrett et al., Figure 2.8.
    • Freund & Nachtigal (1991), QMR: a quasi-minimal residual method for non-Hermitian linear systems.