pub fn lsmr<F, G>(
apply_a: F,
apply_at: G,
b: &[f64],
n: usize,
atol: f64,
btol: f64,
max_iter: usize,
_verbose: bool,
) -> Vec<f64>Expand description
LSMR iterative solver for Ax = b
Solves the least squares problem min ||Ax - b||² using the LSMR algorithm. Based on Fong & Saunders (2011). More stable than LSQR for ill-conditioned problems.
§Arguments
apply_a- Function that computes A*xapply_at- Function that computes A^T*xb- Right-hand side vectorn- Size of solution vectoratol- Absolute tolerancebtol- Relative tolerancemax_iter- Maximum iterationsverbose- Print progress
§Returns
Solution vector x