Trait peroxide::statistics::dist::RNG
source · pub trait RNG {
// Required methods
fn sample_with_rng<R: Rng + Clone>(&self, rng: &mut R, 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;
// Provided method
fn sample(&self, n: usize) -> Vec<f64> { ... }
}
Expand description
Required Methods§
sourcefn sample_with_rng<R: Rng + Clone>(&self, rng: &mut R, n: usize) -> Vec<f64>
fn sample_with_rng<R: Rng + Clone>(&self, rng: &mut R, n: usize) -> Vec<f64>
Extract samples of distributions with rng
sourcefn pdf<S: PartialOrd + SampleUniform + Copy + Into<f64>>(&self, x: S) -> f64
fn pdf<S: PartialOrd + SampleUniform + Copy + Into<f64>>(&self, x: S) -> f64
sourcefn cdf<S: PartialOrd + SampleUniform + Copy + Into<f64>>(&self, x: S) -> f64
fn cdf<S: PartialOrd + SampleUniform + Copy + Into<f64>>(&self, x: S) -> f64
Provided Methods§
Object Safety§
This trait is not object safe.
Implementors§
impl RNG for WeightedUniform<f64>
impl<T: PartialOrd + SampleUniform + Copy + Into<f64>> RNG for OPDist<T>
RNG for OPDist
impl<T: PartialOrd + SampleUniform + Copy + Into<f64>> RNG for TPDist<T>
RNG for TPDist