Skip to main content

project_linf

Function project_linf 

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

Project perturbation onto the L∞ ball of radius epsilon.

Each component is clamped independently to [−ε, ε].