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