Function iterative_methods::reservoir_sample[][src]

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

An adaptor for which the items are random samples of the underlying iterator up to the item processed. The constructor for ReservoirSample.