Solves a real symmetric positive or negative definite system
using a conjugate gradient method with or without preconditioning.
double vector of length n containing the right-hand side. A double vector of length n containing the approximate solution to the linear system.
| Exception Type | Condition |
|---|---|
| ArgumentException | is thrown if the length of b is not consistent with the order n of A. |
| SingularPreconditionMatrixException | is thrown if the preconditioning matrix is singular. |
| NotDefinitePreconditionMatrixException | is thrown if the preconditioning matrix is not definite. |
| SingularMatrixException | is thrown if input matrix A is singular. |
| NotDefiniteAMatrixException | is thrown if matrix A is not definite. |
| NoConvergenceException | is thrown if the algorithm is not convergent within MaxIterations iterations. |
| NotDefiniteJacobiPreconditionerException | is thrown if the Jacobi preconditioner is not definite. |
ConjugateGradient Class | Imsl.Math Namespace