SFMTMixin

Common functions of RunTimeSFMT and SFMT.

Members

Functions

assureLongPeriod
bool assureLongPeriod()

returns true if modification is done

fillState
void fillState(ubyte b)
Undocumented in source. Be warned that the author may not have intended to support it.
front
ulong front()

input range interface.

frontPop
T frontPop()
Undocumented in source. Be warned that the author may not have intended to support it.
frontPop
T frontPop()
Undocumented in source. Be warned that the author may not have intended to support it.
next
T next(size_t size)
popFront
void popFront()

input range interface.

seed
void seed(uint seed)
seed
void seed(uint[] seed)

Manifest constants

empty
enum empty;

input range interface.

isUniformRandom
enum isUniformRandom;
max
enum max;
min
enum min;

Variables

idx
int idx;
Undocumented in source.

Examples

auto ct = SFMT19937(13579u);
RunTimeSFMT rt;
rt.mexp(ct.mersenneExponent);
rt.m = ct.m;
rt.shifts = ct.shifts;
rt.masks = ct.masks;
rt.parity = ct.parity;
rt.seed(13579u);
foreach (i; 0..1000)
    assert (ct.frontPop!ulong == rt.frontPop!ulong);
stderr.writeln("checked compile time and run time");

Meta