CG: Solve Ax=b by preconditioned conjugate gradients

View source: R/conjugate_gradients.R

CGR Documentation

Solve Ax=b by preconditioned conjugate gradients

Description

Solve Ax=b by preconditioned conjugate gradients

Usage

CG(b, env, x = NULL, max.it = NULL, e = NULL, verbose = FALSE, ...)

Arguments

b

right hand side vector.

env

environment containing at least a function A_times that computes the matrix-vector product Ax for some input vector x, and a function M_solve that computes M^-1 x for some preconditioner matrix M.

x

start value for the conjugate gradient algorithm.

max.it

maximum number of iterations.

e

total squared error stop criterion.

verbose

whether progress information is shown.

...

any parameters passed to A_times and M_solve.

Value

The (approximated) solution to Ax=b.

References

M.R. Hestenes and E. Stiefel (1952). Methods of conjugate gradients for solving linear systems. Journal of Research of the National Bureau of Standards 49(6), 409-436.


mcmcsae documentation built on Oct. 11, 2023, 1:06 a.m.