Function solana_gossip::weighted_shuffle::weighted_sample_single[][src]

pub fn weighted_sample_single<R: Rng, T>(
    rng: &mut R,
    cumulative_weights: &[T]
) -> Option<usize> where
    T: Copy + Default + PartialOrd + SampleUniform