Click or drag to resize
ConjugateGradientSolve Method
Solves a real symmetric positive or negative definite system Ax=b using a conjugate gradient method with or without preconditioning.

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
public double[] Solve(
	double[] b
)

Parameters

b
Type: SystemDouble
A double vector of length n containing the right-hand side.

Return Value

Type: Double
A double vector of length n containing the approximate solution to the linear system.
Exceptions
ExceptionCondition
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.
See Also