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.
This is recommended for random number generation on 32-bit systems
unless memory is severely restricted, in which case a
Xorshift
would be the generator of choice.
importmir.random.engine;
// bit-masking by generator maximum is necessary// to handle 64-bit `unpredictableSeed`autogen = Mt19937(unpredictableSeed & Mt19937.max);
auton = gen();
importstd.traits;
staticassert(is(ReturnType!gen == uint));
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.
This is recommended for random number generation on 32-bit systems unless memory is severely restricted, in which case a Xorshift would be the generator of choice.