Template Function ADS::sampleBySorting

Function Documentation

template<class R>
std::vector<std::size_t> ADS::sampleBySorting(std::size_t n, std::size_t N, R &g, std::size_t *rounds = nullptr)

n of the positions 0 , … , N - 1, sorted, by a bucket sort of random positions; the rounds of draws go to *rounds, if given

Pre:

n <= N

Post:

n distinct positions below N, sorted (an audit)