g05kkc allows for the generation of multiple, independent, sequences of pseudorandom numbers using the skip-ahead method. The base pseudorandom number sequence defined by
state is advanced
places.
g05kkc adjusts a base generator to allow multiple, independent, sequences of pseudorandom numbers to be generated via the skip-ahead method (see the
G05 Chapter Introduction for details).
If, prior to calling
g05kkc the base generator defined by
state would produce random numbers
, then after calling
g05kkc the generator will produce random numbers
.
One of the initialization functions
g05kfc (for a repeatable sequence if computed sequentially) or
g05kgc (for a non-repeatable sequence) must be called prior to the first call to
g05kkc.
The skip-ahead algorithm can be used in conjunction with any of the six base generators discussed in the
G05 Chapter Introduction.
Haramoto H, Matsumoto M, Nishimura T, Panneton F and L'Ecuyer P (2008) Efficient jump ahead for F2-linear random number generators INFORMS J. on Computing 20(3) 385–390
Not applicable.
Calling
g05kkc and then generating a series of uniform values using
g05sac is equivalent to, but more efficient than, calling
g05sac and discarding the first
values. This may not be the case for distributions other than the uniform, as some distributional generators require more than one uniform variate to generate a single draw from the required distribution.
This example initializes a base generator using
g05kfc and then uses
g05kkc to advance the sequence
places before generating five variates from a uniform distribution using
g05sac.