nag_rand_exp_mix (g05sgc) generates a vector of pseudorandom numbers from an exponential mix distribution composed of exponential distributions each having a mean and weight .
The distribution has PDF (probability density function)
where
and
,
.
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_exp_mix (g05sgc).
Not applicable.
nag_rand_exp_mix (g05sgc) is threaded by NAG for parallel execution in multithreaded implementations of the NAG Library.
Please consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
This example prints the first five pseudorandom numbers from an exponential mix distribution comprising three exponential distributions with parameters
,
and
, and with respective weights
,
and
. The numbers are generated by a single call to nag_rand_exp_mix (g05sgc), after initialization by
nag_rand_init_repeatable (g05kfc).
None.