fn weighted_sample_with_replacement( population: &[i64], weights: &[f64], size: usize, rng: &mut impl Rng, ) -> Vec<Option<i64>>
Weighted sampling with replacement using cumulative probability + binary search.