Next: RNG members, Previous: RNG details, Up: Random Number Generators [Contents][Index]
RNGs take three template parameters, all of which have default values.
Using the Uniform RNG as an example, the template parameters of
Uniform<T, IRNG, stateTag> are:
Tis the type of random number to generate (one of float,
double, or long double for continuous distributions; an
integer type for discrete distributions). Note that generating double and
long double RNGs takes longer, because filling the entire mantissa with
random bits requires several random integers. The default parameter for
most generators is float.
IRNGis the underlying Integer RNG to use. The default is MersenneTwister.
stateTagis either sharedState or independentState. If
sharedState, the IRNG is shared with other generators. If
independentState, the RNG contains its own IRNG. The default is
sharedState.