The OpenD Programming Language

SplitMixEngine.this

Constructs a SplitMixEngine generator seeded with x0 using the specified increment.

Note from the authors (the paper uses γ to refer to the increment):

<blockquote> We tested PRNG objects with “sparse” γ values whose representations have either very few 1-bits or very few 0-bits, and found that such cases produce pseudorandom sequences that DieHarder regards as “weak” just a little more often than usual. </blockquote>

As a consequence the provided split function guards against this and also against increments that have long consecutive runs of either 1 or 0. However, this constructor only forces increment to be an odd number and performs no other transformation.

  1. this(ulong x0)
  2. this(ulong x0, ulong increment)
    struct SplitMixEngine(alias mixer, bool split_enabled = false, OptionalArgs...)
    @nogc nothrow pure @safe
    this
    ()
    (
    ulong x0
    ,
    ulong increment
    )
    if (
    (
    __traits(compiles, ) ||
    __traits(compiles, )
    )
    &&
    (
    OptionalArgs.length < 1 ||
    (
    is(typeof(OptionalArgs[1]) == ulong) &&
    OptionalArgs[1] != DEFAULT_SPLITMIX_INCREMENT
    )
    )
    &&
    OptionalArgs.length < 2
    )

Meta