pub fn proj_simplex(x: &[f64]) -> Vec<f64>
Project x onto the probability simplex Δ = {z ≥ 0 : sum z = 1}.
x
Uses the O(n log n) algorithm by Duchi et al. (2008).