use num::Complex;
use RustQuant_error::RustQuantError;
#[allow(non_upper_case_globals)]
pub const i: Complex<f64> = Complex { re: 0.0, im: 1.0 };
#[allow(clippy::module_name_repetitions)]
pub enum DistributionClass {
Discrete,
Continuous,
}
pub trait Distribution {
fn cf(&self, t: f64) -> Complex<f64>;
fn pdf(&self, x: f64) -> f64;
fn pmf(&self, x: f64) -> f64;
fn cdf(&self, x: f64) -> f64;
fn inv_cdf(&self, p: f64) -> f64;
fn mean(&self) -> f64;
fn median(&self) -> f64;
fn mode(&self) -> f64;
fn variance(&self) -> f64;
fn skewness(&self) -> f64;
fn kurtosis(&self) -> f64;
fn entropy(&self) -> f64;
fn mgf(&self, t: f64) -> f64;
fn sample(&self, n: usize) -> Result<Vec<f64>, RustQuantError>;
}