fn cg_solve_medi<F>(
ws: &mut MediWorkspace,
w: &[Complex32],
d_kernel: &[f32],
mx: &[f32],
my: &[f32],
mz: &[f32],
vr: &[f32],
lambda: f32,
b: &[f32],
x: &mut [f32],
tol: f32,
max_iter: usize,
progress_callback: F,
)Expand description
Conjugate gradient solver with buffer reuse Solves Ax = b where A is the MEDI operator
The optional progress callback receives (cg_iter, max_iter) for each CG iteration. Uses per-direction gradient masks (mx, my, mz) matching MATLAB MEDI.