[][src]Trait peroxide::statistics::dist::RNG

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

Random Number Generator trait

Methods

  • sample: extract samples

Required methods

pub fn sample(&self, n: usize) -> Vec<f64>[src]

Extract samples of distributions

pub fn pdf<S: PartialOrd + SampleUniform + Copy + Into<f64>>(&self, x: S) -> f64[src]

Probability Distribution Function

Type

f64 -> f64

pub fn cdf<S: PartialOrd + SampleUniform + Copy + Into<f64>>(&self, x: S) -> f64[src]

Cumulative Distribution Function

Type

f64 -> f64

Loading content...

Implementors

impl<T: PartialOrd + SampleUniform + Copy + Into<f64>> RNG for OPDist<T>[src]

RNG for OPDist

impl<T: PartialOrd + SampleUniform + Copy + Into<f64>> RNG for TPDist<T>[src]

RNG for TPDist

Loading content...