1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
#[cfg(test)]
extern crate openblas_src;
pub extern crate opensrdk_linear_algebra;
pub extern crate rand;
extern crate rand_distr;

pub mod multivariate_normal;
pub mod normal;

pub use crate::multivariate_normal::*;
pub use crate::normal::*;
use rand::prelude::*;

pub trait Distribution {
    fn sample(&self, thread_rng: &mut ThreadRng) -> Result<f64, String>;
}

pub trait MultivariateDistribution {
    fn sample(&self, thread_rng: &mut ThreadRng) -> Result<Vec<f64>, String>;
}