Solves a real symmetric definite linear system using the conjugate gradient method with optional preconditioning.
For a list of all members of this type, see ConjugateGradient Members.
System.Object
Imsl.Math.ConjugateGradient
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Class ConjugateGradient
solves the symmetric positive or negative definite linear system using the conjugate gradient method with optional preconditioning. This method is described in detail by Golub and Van Loan (1983, Chapter 10), and in Hageman and Young (1981, Chapter 7).
The preconditioning matrix M is a matrix that approximates A, and for which the linear system Mz=r is easy to solve. These two properties are in conflict; balancing them is a topic of current research. If no preconditioning matrix is specified, is set to the identity, i.e. .
The number of iterations needed depends on the matrix and the error tolerance. As a rough guide,
where n is the order of matrix A. See the references for details.Let M be the preconditioning matrix, let b,p,r,x and z be vectors and let be the desired relative error. Then the algorithm used is as follows:
endfor
Here, is an estimate of , the largest eigenvalue of the iteration matrix . The stopping criterion is based on the result (Hageman and Young 1981, pp. 148-151)
where It is also known that where the are the symmetric, tridiagonal matrices with and, for ,Usually, the eigenvalue computation is needed for only a few of the iterations.
Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll)
ConjugateGradient Members | Imsl.Math Namespace | Example without preconditioning | Example with different preconditioners