nag_rngs_logarithmic (g05mdc) generates a vector of pseudorandom integers from the discrete logarithmic distribution with parameter .
nag_rngs_logarithmic (g05mdc) 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_rngs_logarithmic (g05mdc) with the same parameter value can then use this reference vector to generate further variates.
One of the initialization functions
nag_rngs_init_repeatable (g05kbc) (for a repeatable sequence if computed sequentially) or
nag_rngs_init_nonrepeatable (g05kcc) (for a non-repeatable sequence) must be called prior to the first call to nag_rngs_logarithmic (g05mdc).
Not applicable.
None.
This example prints five pseudorandom integers from a logarithmic distribution with parameter
, generated by a single call to nag_rngs_logarithmic (g05mdc), after initialization by
nag_rngs_init_repeatable (g05kbc).
None.