pub trait Distribution<T> {
// Required method
fn sample(&self, rng: &mut Random) -> T;
// Provided method
fn samples<'a>(&'a self, rng: &'a mut Random) -> Iter<'a, Self, T> ⓘ
where Self: Sized { ... }
}Expand description
A distribution that can be sampled with a mutable Random.
T is the sample type - usually f64 for continuous
distributions, u64 for integer ones, but any T is allowed.