Skip to main content

cgsolve

Function cgsolve 

Source
pub(crate) fn cgsolve(
    a: impl FnMut(&[f64], &mut [f64]),
    b: &[f64],
    tol: f64,
    max_iter: usize,
    cg: &mut CgBuffers,
    progress: impl FnMut(usize),
)
Expand description

cgsolve.m from a zero start; the last iterate is left in cg.x. progress receives the iteration count. The dot products are summed in index order, as before.