Template Function ADS::uniformBelow

Function Documentation

template<FullWordGenerator G>
std::uint64_t ADS::uniformBelow(G &&g, std::uint64_t s)

an integer uniform in [ 0 , s ), by the method of Lemire

Pre:

s >= 1

Post:

the result is below s