SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.solver.iterative.nonstationary
Class MinimalResidualSolver

java.lang.Object
  extended by com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.solver.iterative.nonstationary.MinimalResidualSolver
All Implemented Interfaces:
IterativeSolver

public class MinimalResidualSolver
extends java.lang.Object
implements IterativeSolver

The Minimal Residual method (MINRES) is useful for solving symmetric n-by-n linear systems (possibly indefinite or singular).

When the matrix A is Hermitian, the Arnoldi algorithm used in GMRES can be simplified to a 3-term recurrence known as Lanczos algorithm. Thus, the approximate solution can be computed without saving all the orthonormal basis vectors generated.

If A is singular, MINRES returns a least-squares solution with small ||Ar|| (where r = b - Ax).

Only left preconditioning is supported in this implementation.

See Also:
"Anne Greenbaum, “Algorithm 4P,” Iterative methods for solving linear systems, ch.8, pp.122."

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
MinimalResidualSolver()
           
 
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

MinimalResidualSolver

public MinimalResidualSolver()
Method Detail

solve

public Vector solve(IterativeSolver.Problem problem)
             throws IterativeSolver.ConvergenceFailure
Description copied from interface: IterativeSolver
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.

Specified by:
solve in interface IterativeSolver
Parameters:
problem - the problem of solving Ax = b
Returns:
the computed solution for the problem
Throws:
IterativeSolver.ConvergenceFailure - if the algorithm fails to converge

solve

public Vector solve(IterativeSolver.Problem problem,
                    IterationMonitor monitor)
             throws IterativeSolver.ConvergenceFailure
Description copied from interface: IterativeSolver
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.

In each iteration, the newly computed iterate is added to the IterationMonitor for statistics or diagnostic purpose.

Specified by:
solve in interface IterativeSolver
Parameters:
problem - the problem of solving Ax = b
monitor - an IterationMonitor instance
Returns:
the computed solution for the problem
Throws:
IterativeSolver.ConvergenceFailure - if the algorithm fails to converge

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.