pub fn lsqr_matlab<F, G>(
apply_a: F,
apply_ah: G,
b: &[Complex64],
tol: f64,
max_iter: usize,
) -> (Vec<Complex64>, LsqrOutcome)Expand description
LSQR (Paige & Saunders 1982) with MATLAB lsqr’s stopping rules, zero initial guess, no
preconditioner: stops when ‖r‖ ≤ tol·‖b‖ or ‖Aᴴr‖ / (‖A‖_F·‖r‖) ≤ tol (both tested on
the previous iterate, before it is updated), after three stagnant steps, or on breakdown.
apply_a computes A x, apply_ah computes Aᴴ u.