A MersenneTwisterEngine instantiated with the parameters of the
original engine MT19937, generating uniformly-distributed 32-bit numbers with a
period of 2 to the power of 19937. Recommended for random number
generation unless memory is severely restricted, in which case a LinearCongruentialEngine would be the generator of choice.
// seed with a constantMt19937gen;
auton = gen.front; // same for each runassert(n == 3499211612);
// Seed with an unpredictable valuegen.seed(unpredictableSeed);
n = gen.front; // different across runs
A MersenneTwisterEngine instantiated with the parameters of the original engine MT19937, generating uniformly-distributed 32-bit numbers with a period of 2 to the power of 19937. Recommended for random number generation unless memory is severely restricted, in which case a LinearCongruentialEngine would be the generator of choice.