Distribution

Trait Distribution 

Source
pub trait Distribution: DynClone {
    // Required method
    fn sample(&self) -> i32;
}
Expand description

An integer-valued probability distribution.

We need to be able to clone Box, so we use the wonderful dyn_clone crate to allow for this.

Required Methods§

Source

fn sample(&self) -> i32

Take a sample from this distribution.

Implementations on Foreign Types§

Source§

impl Distribution for i32

A constant distribution

Source§

fn sample(&self) -> i32

Implementors§