PCGEngine

The main PCG engine.

It takes several configurable parameters.

struct PCGEngine (
ResultType
StateType
alias OutputFunc
bool OutputPrevious = true
alias StreamTypeMixin = OneSeq
StateType Multiplier = default_multiplier!StateType
) {
enum isUniformRandom;
enum min;
enum max;
enum empty;
}

Constructors

this
this(StateType seed)

+ Creates and seeds a new RNG.

this
this(StateType seed, StateType stream)

+ Creates and seeds a new RNG, at the specified stream. + Only available if using the SetSeq variation.

Members

Functions

front
ResultType front()
popFront
void popFront()
popFrontN
void popFrontN(StateType amount)

Advances the RNG faster than calling popFrontN multiple times.

save
inout(typeof(this)) save()
seed
void seed(StateType seed)

Seeds the RNG.

seed
void seed(StateType seed, StateType stream)

+ Seeds the RNG and sets the stream. + Only available if using the SetSeq variation.

Meta