g05khc adjusts a base generator to allow multiple, independent, sequences of pseudorandom numbers to be generated via the leap-frog method (see the
G05 Chapter Introduction for details).
If, prior to calling
g05khc the base generator defined by
state would produce random numbers
${x}_{1},{x}_{2},{x}_{3},\dots $, then after calling
g05khc the generator will produce random numbers
${x}_{k},{x}_{k+n},{x}_{k+2n},{x}_{k+3n},\dots $.
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
g05khc.
The leap-frog algorithm can be used in conjunction with the NAG basic generator, both the Wichmann–Hill I and Wichmann–Hill II generators, the Mersenne Twister and L'Ecuyer.
Not applicable.
The leap-frog method tends to be less efficient than other methods of producing multiple, independent sequences. See the
G05 Chapter Introduction for alternative choices.
This example creates three independent sequences using
g05khc, after initialization by
g05kfc. Five variates from a uniform distribution are then generated from each sequence using
g05sac.
None.