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

Generate a Bernoulli distributed random variate.

This function returns a pseudo-random variate drawn from the Bernoulli distribution with probability of success p.

Parameters:
pThe probability of success on a trial.
Exceptions:
scythe_invalid_arg(Level 1)