Skip to contents

Draws the relative residual after each iteration on a logarithmic scale, one line per system solved.

Usage

# S3 method for class 'pcg_result'
plot(x, tol = NULL, ...)

Arguments

x

An object from pcg().

tol

Optional tolerance to mark with a horizontal line.

...

Passed to graphics::matplot().

Value

x, invisibly.

Examples

set.seed(1)
X <- matrix(rnorm(1000), ncol = 2)
K <- as.matrix(kernel_matrix(X))
plot(pcg(K, rnorm(500), mu = 1e-3), tol = 1e-8)