Template Function ADS::reservoirSampleL

Function Documentation

template<std::input_iterator I, std::sentinel_for<I> S, class R>
std::vector<std::iter_value_t<I>> ADS::reservoirSampleL(I first, S last, std::size_t n, R &g)

n items of [ first , last ), a stream of unknown length, by the skips of Algorithm L, in no particular order; all of them, in their order, when the stream has at most n items