use rand::Rng;
use statistics::{Min, Max};
pub use self::bernoulli::Bernoulli;
pub use self::beta::Beta;
pub use self::binomial::Binomial;
pub use self::chi::Chi;
pub use self::chi_squared::ChiSquared;
pub use self::discrete_uniform::DiscreteUniform;
pub use self::exponential::Exponential;
pub use self::gamma::Gamma;
pub use self::log_normal::LogNormal;
pub use self::normal::Normal;
pub use self::poisson::Poisson;
pub use self::students_t::StudentsT;
pub use self::triangular::Triangular;
pub use self::uniform::Uniform;
pub use self::weibull::Weibull;
mod bernoulli;
mod beta;
mod binomial;
mod chi;
mod chi_squared;
mod discrete_uniform;
mod exponential;
mod gamma;
mod log_normal;
mod normal;
mod poisson;
mod students_t;
mod triangular;
mod uniform;
mod weibull;
pub trait Distribution<T> {
fn sample<R: Rng>(&self, r: &mut R) -> T;
}
pub trait Univariate<T, K>: Distribution<K> + Min<T> + Max<T> {
fn cdf(&self, x: K) -> K;
}
pub trait Continuous<T, K>: Distribution<K> {
fn pdf(&self, x: T) -> K;
fn ln_pdf(&self, x: T) -> K;
}
pub trait Discrete<T, K>: Distribution<K> {
fn pmf(&self, x: T) -> K;
fn ln_pmf(&self, x: T) -> K;
}