simsam 0.1.0

Sample from custom discrete and continuous distributions (SciPy-like API)
Documentation
1
2
3
4
5
6
7
8
9
10
11
/// Probability mass function on a finite support.
pub trait Pmf {
    fn pmf(&self, index: usize) -> f64;
    fn len(&self) -> usize;
}

/// Discrete cumulative distribution at support index `k` (inclusive).
pub trait CdfDiscrete {
    fn cdf_at(&self, index: usize) -> f64;
    fn len(&self) -> usize;
}