nag_rngs_init_nonrepeatable (g05kcc) sets the seeds to a non-repeatable initial value for the selected generator as used by and passed to the group of pseudorandom number functions
g05k–g05q.
nag_rngs_init_nonrepeatable (g05kcc) sets the seeds used by the selected generator mechanism (see the g05 Chapter Introduction) to values calculated from the setting of the real-time clock. The pseudorandom number generator is selected by the input value of the argument igen.
This function will yield different subsequent sequences of random numbers in different runs of the calling program. It should be noted that there is no guarantee of statistical properties between sequences, only within sequences.
4 References
None.
5 Arguments
1:
igen – Integer *Input/Output
On entry: must contain the identification number for the generator to be used to return a pseudorandom number and should remain unchanged until a re-initialization by a call to one of the functions nag_rngs_init_repeatable (g05kbc) or nag_rngs_init_nonrepeatable (g05kcc). The values that may be chosen are:
On exit: if on input then igen is set to , if on input then igen is set to .
2:
iseed[] – IntegerCommunication Array
On exit: contains values which define an initial state for the generator selected by the argument igen. The values returned will differ for each run of the calling program.
6 Error Indicators and Warnings
None.
7 Accuracy
Not applicable.
8 Further Comments
None.
9 Example
This example prints the first five pseudorandom real numbers from a uniform distribution between and , generated by nag_rngs_basic (g05kac) after initialization by nag_rngs_init_nonrepeatable (g05kcc).