Template Function ADS::sampleBySwaps

Function Documentation

template<class R>
std::vector<std::size_t> ADS::sampleBySwaps(std::size_t n, std::size_t N, R &g)

n of the positions 0 , … , N - 1, sorted, by n swaps in an array of the N positions

Pre:

n <= N

Post:

n distinct positions below N, sorted (an audit)