IMSL C# Numerical Library

ConjugateGradient.Solve Method 

Solves a real symmetric positive or negative definite system Ax=b using a conjugate gradient method with or without preconditioning.

public double[] Solve(
   double[] b
);

Parameters

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

Return Value

A double vector of length n containing the approximate solution to the linear system.

Exceptions

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.

See Also

ConjugateGradient Class | Imsl.Math Namespace