Xorshift32

Define XorshiftEngine generators with well-chosen parameters as provided by Marsaglia (2003). The default provided by Xorshift corresponds to the 128-bit generator as an optimal balance of statistical quality and speed.

alias Xorshift32 = XorshiftEngine!(uint, 32, 13, 17, 15)

Examples

// Initialize an Xorshift generator seeded with constant default value
auto rng = new Xorshift;
auto n = rng.front;  // same for each run

// Seed with an unpredictable value
rng.seed(unpredictableSeed);
n = rng.front;  // different across runs

Meta