public class CGS extends AbstractIterativeSolver
Ax = b
using the Conjugate Gradient Squared methoditer, M
Constructor and Description |
---|
CGS(Vector template)
Constructor for CGS.
|
Modifier and Type | Method and Description |
---|---|
Vector |
solve(Matrix A,
Vector b,
Vector x)
Solves the given problem, writing result into the vector.
|
checkSizes, getIterationMonitor, getPreconditioner, setIterationMonitor, setPreconditioner
public CGS(Vector template)
template
- Vector to use as template for the work vectors needed in the
solution processpublic Vector solve(Matrix A, Vector b, Vector x) throws IterativeSolverNotConvergedException
IterativeSolver
A
- Matrix of the problemb
- Right hand sidex
- Solution is stored here. Also used as initial guessIterativeSolverNotConvergedException