com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.solver.iterative.stationary
Class JacobiSolver
java.lang.Object
com.numericalmethod.suanshu.matrix.doubles.matrixtype.sparse.solver.iterative.stationary.JacobiSolver
- All Implemented Interfaces:
- IterativeSolver
public class JacobiSolver
- extends java.lang.Object
- implements IterativeSolver
In each iteration, Jacobi method solves n equations in the linear
system Ax = b in isolation sequentially. For the i-th equation,
we solve for the value of xi while assuming the other
entries of x remain fixed. The convergence of this method is slow.
Preconditioning is not supported in this solver.
- See Also:
- Wikipedia: Jacobi method
|
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 |
JacobiSolver
public JacobiSolver()
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 = bmonitor - an IterationMonitor instance
- Returns:
- the computed solution for the problem
- Throws:
IterativeSolver.ConvergenceFailure - if the algorithm fails to converge
Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.