Skip to main content

tv_objective

Function tv_objective 

Source
fn tv_objective(
    x: &[f64],
    mu: f64,
    masks: &HomogeneityMasks,
    grid: &Grid,
    ws: &mut TvWorkspace,
    df: &mut [f64],
) -> f64
Expand description

Smoothed weighted-TV objective and its gradient.

Returns f_μ(x) and writes ∇f_μ(x) into df. Two passes over the volume, each parallel over z-slabs: the first builds the masked gradients and the smoothing weight w, the second applies the adjoint differences.