17 #ifndef _UTIL_MT19937_RNG_H_
18 #define _UTIL_MT19937_RNG_H_
37 static void seed(uint64_t new_seed = std::mt19937_64::default_seed) { inst().seed(new_seed); }
43 std::uniform_int_distribution<uint64_t> u;
50 template <
typename T>
static T
uniform() {
51 std::uniform_int_distribution<T> u;
60 static uint64_t
uniform(uint64_t min, uint64_t max) {
62 std::uniform_int_distribution<uint64_t> u(min, max);
70 std::normal_distribution<> u;
78 std::lognormal_distribution<> u;
83 static std::mt19937_64& inst() {
84 static thread_local std::mt19937_64 rng;
a Mersenne-Twister pseudo random number generator
static void seed(uint64_t new_seed=std::mt19937_64::default_seed)
static double lognormal()
static uint64_t uniform()
static uint64_t uniform(uint64_t min, uint64_t max)