nag_rand_logarithmic (g05tfc) generates a vector of pseudorandom integers from the discrete logarithmic distribution with parameter .
nag_rand_logarithmic (g05tfc) generates
integers
from a discrete logarithmic distribution, where the probability of
is
where
The variates can be generated with or without using a search table and index. If a search table is used then it is stored with the index in a reference vector and subsequent calls to
nag_rand_logarithmic (g05tfc) with the same parameter value can then use this reference vector to generate further variates.
One of the initialization functions
nag_rand_init_repeatable (g05kfc) (for a repeatable sequence if computed sequentially) or
nag_rand_init_nonrepeatable (g05kgc) (for a non-repeatable sequence) must be called prior to the first call to nag_rand_logarithmic (g05tfc).
Not applicable.
nag_rand_logarithmic (g05tfc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the
x06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
This example prints
pseudorandom integers from a logarithmic distribution with parameter
, generated by a single call to nag_rand_logarithmic (g05tfc), after initialization by
nag_rand_init_repeatable (g05kfc).
None.