cg [MTL Home] Programmers Guide
  Contents | Index |  Search 


Category:itl,algorithms Component type:function
Prototype
template < class Matrix, class VectorX, class VectorB, class Preconditioner, class Iteration >
int cg(const Matrix& A, VectorX& x, const VectorB& b, const Preconditioner& M, Iteration& iter) ;
Description
Solves the symmetric positive definite linear system A x = b.

A return value of 0 indicates convergence within the maximum number of iterations (determined by the iter object). A return value of 1 indicates a failure to converge.

See M. R. Hestenes nd E. Stiefel, Methods of conjugate gradients for solving linear system, Journal of Research of the National Bureau of Standards, 49(1952), pp. 409-436

Definition
cg.h
Preconditions
Complexity
Example
Notes
See also

[MTL Home] Copyright © 1998,1999 University of Notre Dame. All Rights Reserved.