SOL Logo

Systems Optimization Laboratory

Stanford University
Dept of Management Science and Engineering (MS&E)

Huang Engineering Center

Stanford, CA 94305-4121  USA

cgLanczos: CG method for positive definite Ax = b

  • AUTHOR: M. A. Saunders
  • CONTRIBUTORS: C. C. Paige, Tung-Yu Wu, Ruijie Zhou
  • CONTENTS: A MATLAB implementation of the Conjugate Gradient method for linear equations:  Solve \[ Ax = b, \] where the matrix \(A\) is symmetric and positive definite.
    Special feature: Returns an estimate of diag(\(A^{-1}\)).
    C. C. Paige and M. A. Saunders (1975). Solution of sparse indefinite systems of linear equations, SINUM 12, 617--629.
    22 Oct 2007: cgLanczos.m (first version) implemented to assist Giannis Chantas (, Dept of Computer Science, University of Ioannina, Greece.

    18 Nov 2013: cgLanczos2.m derived from CME 338 class project of Tung-Yu Wu and Ruijie Zhou, Stanford University. Calling sequence matches Matlab's pcg. Better stopping rules implemented.