Function iterative_methods::weighted_reservoir_sample[][src]

pub fn weighted_reservoir_sample<I, T>(
    it: I,
    capacity: usize,
    custom_rng: Option<Pcg64>
) -> WeightedReservoirSample<I, T> where
    I: Sized + StreamingIterator<Item = WeightedDatum<T>>,
    T: Clone
Expand description

Create a random sample of the underlying weighted stream.