pub fn soft_threshold(x: f64, lambda: f64) -> f64
Apply element-wise soft-thresholding: sign(x) * max(|x| - lambda, 0).
sign(x) * max(|x| - lambda, 0)
Used as a proximal operator in iterative shrinkage-thresholding algorithms.