pub trait RNG {
    fn sample(&self, n: usize) -> Vec<f64>;
fn pdf<S: PartialOrd + SampleUniform + Copy + Into<f64>>(&self, x: S) -> f64;
fn cdf<S: PartialOrd + SampleUniform + Copy + Into<f64>>(&self, x: S) -> f64; }
Expand description

Random Number Generator trait

Methods

  • sample: extract samples

Required methods

Extract samples of distributions

Probability Distribution Function

Type

f64 -> f64

Cumulative Distribution Function

Type

f64 -> f64

Implementors

RNG for OPDist

RNG for TPDist