Best way to seed mt19937_64 for Monte Carlo simulations
Use std::random_device to generate the seed. It’ll provide non-deterministic random numbers, provided your implementation supports it. Otherwise it’s allowed to use some other random number engine. std::mt19937_64 prng; seed = std::random_device{}(); prng.seed(seed); operator() of std::random_device returns an unsigned int, so if your platform has 32-bit ints, and you want a 64-bit seed, you’ll need to … Read more