Constructs a SplitMixEngine generator seeded with x0.
Constructs a SplitMixEngine generator seeded with x0 using the specified increment.
A postblit is present on this object, but not explicitly documented in the source.
Either an enum or a settable value depending on whether increment_specifiable == true. This should always be an odd number. The paper refers to this as γ so it is aliased as gamma.
Compatibility with Phobos library methods. Presents this RNG as an InputRange.
Advances the random sequence.
Compatibility with Phobos library methods. Presents this RNG as an InputRange.
Skip forward in the random sequence in O(1) time.
Produces a splitmix generator with a different counter-value and increment-value than the current generator. Only available when <a href="#.SplitMixEngine.increment_specifiable"> increment_specifiable == true</a>.
Compatibility with Phobos library methods. Presents this RNG as an InputRange.
Either DEFAULT_SPLITMIX_INCREMENT or the optional third argument of this template.
Compatibility with Phobos library methods. Presents this RNG as an InputRange.
Either an enum or a settable value depending on whether increment_specifiable == true. This should always be an odd number. The paper refers to this as γ so it is aliased as gamma.
Whether each instance can set its increment individually. Enables the split operation at the cost of increasing size from 64 bits to 128 bits.
Marks as a Mir random engine.
Compatibility with Phobos library methods. Presents this RNG as an InputRange.
Largest generated value.
Compatibility with Phobos library methods. Presents this RNG as an InputRange.
Full period (2 ^^ 64).
Current internal state of the generator.
//Can specify engine like this: alias RNG1 = SplitMixEngine!staffordMix13; alias RNG2 = SplitMixEngine!(fmix64!(0xbf58476d1ce4e5b9UL, 0x94d049bb133111ebUL, 30, 27, 31)); //Each way of writing it results in the same sequence. assert(RNG1(1).opCall() == RNG2(1).opCall()); //However not each result's name is equally informative. static assert(RNG1.stringof == `SplitMixEngine!(staffordMix13, false)`); static assert(RNG2.stringof == `SplitMixEngine!(fmix64, false)`);//Doesn't include parameters of fmix64!
Generic SplitMixEngine.
The first parameter mixer should be a explicit instantiation of fmix64 or a predefined parameterization of fmix64 such as murmurHash3Mix or staffordMix13.
The second parameter is whether the split operation is enabled. Allows each instance to have a distinct increment, increasing the size from 64 bits to 128 bits. If split is not enabled then the opCall, seed, and skip operations will be shared provided the platform supports 64-bit atomic operations.
The third parameter is the default_increment. If the SplitMixEngine has a fixed increment this value will be used for each instance. If omitted this parameter defaults to DEFAULT_SPLITMIX_INCREMENT.