Skip to main content

project_l1

Function project_l1 

Source
pub fn project_l1(perturbation: &[f64], epsilon: f64) -> Vec<f64>
Expand description

Project perturbation onto the L1 ball of radius epsilon.

Uses the classic Duchi et al. (2008) algorithm via sorting of absolute values.