Trait libspecr::Distribution

source ·
pub trait Distribution<T> {
    // Required method
    fn sample(&self, rng: &mut ThreadRng) -> T;
}
Expand description

A probability distribution over values of type T.

Required Methods§

source

fn sample(&self, rng: &mut ThreadRng) -> T

samples a value from the distribution.

Implementors§