pub mod antithetic;
pub mod control_variates;
pub mod halton;
pub mod importance_sampling;
#[cfg(feature = "openblas")]
pub mod lsm;
pub mod mlmc;
pub mod sobol;
pub mod stratified;
use crate::traits::FloatExt;
#[derive(Debug, Clone)]
pub struct McEstimate<T: FloatExt> {
pub mean: T,
pub std_err: T,
pub n_samples: usize,
}
impl<T: FloatExt> McEstimate<T> {
pub fn confidence_interval(&self, z: T) -> (T, T) {
(self.mean - z * self.std_err, self.mean + z * self.std_err)
}
pub fn ci_95(&self) -> (T, T) {
self.confidence_interval(T::from_f64_fast(1.96))
}
}