Skip to main content

DistributionSampler

Trait DistributionSampler 

Source
pub trait DistributionSampler {
    // Required methods
    fn gamma(&self, shape: Float, scale: Float) -> Float;
    fn normal(&self, mean: Float, std_dev: Float) -> Float;
}
Expand description

Provides the way to sample from different distributions.

Required Methods§

Source

fn gamma(&self, shape: Float, scale: Float) -> Float

Returns a sample from gamma distribution.

Source

fn normal(&self, mean: Float, std_dev: Float) -> Float

Returns a sample from normal distribution.

Implementors§