Scythe-1.0.3
template<class RNGTYPE>
unsigned int scythe::rng< RNGTYPE >::rnbinom ( double  n,
double  p 
) [inline]

Generate a negative binomial distributed random variate.

This function returns a pseudo-random variate drawn from the negative binomial distribution with given dispersion parameter and probability of success on each trial.

Parameters:
nThe strictly positive target number of successful trials (dispersion parameters).
pThe probability of success on each trial.
See also:
pnbinom(unsigned int x, double n, double p)
dnbinom(unsigned int x, double n, double p)
Exceptions:
scythe_invalid_arg(Level 1)