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.0.0

Syntax

C#
public double[] Solve(
	double[] b
)
Visual Basic (Declaration)
Public Function Solve ( _
	b As Double() _
) As Double()
Visual C++
public:
array<double>^ Solve(
	array<double>^ b
)

Parameters

b
Type: array< System..::.Double >[]()[]
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

ExceptionCondition
System..::.ArgumentException is thrown if the length of b is not consistent with the order n of A.
Imsl.Math..::.SingularPreconditionMatrixException is thrown if the preconditioning matrix is singular.
Imsl.Math..::.NotDefinitePreconditionMatrixException is thrown if the preconditioning matrix is not definite.
Imsl.Math..::.SingularMatrixException is thrown if input matrix A is singular.
Imsl.Math..::.NotDefiniteAMatrixException is thrown if matrix A is not definite.
Imsl.Math..::.NoConvergenceException is thrown if the algorithm is not convergent within MaxIterations iterations.
Imsl.Math..::.NotDefiniteJacobiPreconditionerException is thrown if the Jacobi preconditioner is not definite.

See Also