Linear Congruential generator.
The Mersenne Twister generator.
Permuted Congruential Generator (PCG)
SplitMix generator family.
The "default", "favorite", "suggested" random number generator type on the current platform. It is an alias for one of the generators. You may want to use it if (1) you need to generate some nice random numbers, and (2) you don't care for the minutiae of the method being used.
Fills a buffer with random data. If not enough entropy has been gathered, it will block.
Fills a buffer with random data. If not enough entropy has been gathered, it won't block. Hence the error code should be inspected.
Fills a buffer with random data. If not enough entropy has been gathered, it will block.
Fills a buffer with random data. If not enough entropy has been gathered, it won't block. Hence the error code should be inspected.
Constructs the mir random seed generators. This constructor needs to be called once before other calls in mir.random.engine.
Destructs the mir random seed generators.
Fills a buffer with random data. If not enough entropy has been gathered, it will block.
Fills a buffer with random data. If not enough entropy has been gathered, it won't block. Hence the error code should be inspected.
Sets or resets the seed of threadLocal!Engine using the given arguments. It is not necessary to call this except if you wish to ensure the PRNG uses a known seed.
threadLocal!Engine returns a reference to a thread-local instance of the specified random number generator allocated and seeded uniquely for each thread. Requires TLS.
A "good" seed for initializing random number engines. Initializing with unpredictableSeed makes engines generate different random number sequences every run.
Like std.traits.ReturnType!T but it works even if T.opCall is a function template.
Test if T is a random engine. A type should define enum isRandomEngine = true; to be a random engine.
Test if T is a saturated random-bit generator. A random number generator is saturated if T.max == ReturnType!T.max. A type should define enum isRandomEngine = true; to be a random engine.
Are the high bits of the engine's output known to have better statistical properties than the low bits of the output? This property is set by checking the value of an optional enum named preferHighBits. If the property is missing it is treated as false.
Uniform random engines.
Sections: Convenience • Entropy • Thread-Local • Traits • C Interface
$(TR $(TDNW $(LREF rne)) $(TD Per-thread uniquely-seeded instance of default <tt class="inline-code">Random</tt>. Requires <a href="https://en.wikipedia.org/wiki/Thread-local_storage">TLS</a>.))