Skip to main content

bernoulli_distribution

Function bernoulli_distribution 

Source
pub fn bernoulli_distribution<U>(uniform_generator: &mut U, p: f64) -> f64
Expand description

A Bernoulli sample: 1 with probability p (a uniform below p), 0 otherwise.