Skip to main content

gmres_affine

Function gmres_affine 

Source
pub fn gmres_affine<T, F>(
    apply_a: F,
    b: &T,
    x0: &T,
    a0: AnyScalar,
    a1: AnyScalar,
    options: &GmresOptions,
) -> Result<GmresResult<T>>
where T: TensorVectorSpace, F: Fn(&T) -> Result<T>,
Expand description

Solve (a0 I + a1 A) x = b using GMRES with relative residual tolerance.

The Arnoldi basis is built from the unshifted A callback, while affine coefficients are applied in the projected Hessenberg problem, matching KrylovKit’s affine linear-solve convention.