Mark as Random Number Generator
range primitives
maximum value
minimum value
import std.algorithm; import std.range; import std.stdio; WELLEngine!"512a" rng; static assert(isUniformRNG!(typeof(rng))); static assert(isSeedable!(typeof(rng))); rng.seed(100); assert(equal(rng.save.take(8), [ 2230636158, 1842930638, 155680193, 1855495099, 2311897807, 3102313483, 3970788677, 3720522367,])); // save test auto saved1 = rng.save; auto saved2 = rng.save; rng.popFrontN(100); assert(equal(saved1.save.take(64), saved2.save.take(64))); saved1.popFrontN(100); assert(equal(rng.save.take(64), saved1.save.take(64))); assert(rng.front == 1947823519); rng.popFront(); rng.popFrontN(10000); assert(rng.front == 2831551372);
WELL(512a) Random Number Generator. See: http://www.iro.umontreal.ca/~panneton/WELLRNG.html