pub fn cg_solve(
a: &CsrMatrix,
b: &[f64],
x0: &[f64],
tol: f64,
max_iter: usize,
) -> (Vec<f64>, u32, f64)Expand description
Conjugate Gradient solver for symmetric positive-definite systems A x = b.
Returns (x, n_iter, residual_norm).