| 30 | /// @returns i, where lower <= i < upper |
| 31 | template <typename I> |
| 32 | I RandomUInt(std::mt19937_64* engine, I lower, I upper) { |
| 33 | assert(lower < upper && "|lower| must be stictly less than |upper|"); |
| 34 | return std::uniform_int_distribution<I>(lower, upper - 1)(*engine); |
| 35 | } |
| 36 | |
| 37 | /// Helper for obtaining a seed bias value for HashCombine with a bit-width |
| 38 | /// dependent on the size of size_t. |
no outgoing calls
no test coverage detected