fn cg_solve_masked<F, Op>( b: &[f64], _mask: &[f64], max_iter: usize, tol: f64, callback: &mut F, apply_ata: Op, ) -> Vec<f64>where F: FnMut(usize, usize), Op: Fn(&[f64]) -> Vec<f64>,
Generic CG solver for masked normal equations