use std::fmt::Debug;
use dyn_clone::DynClone;
use crate::linalg::{DimName, MatrixX, VectorX};
#[cfg_attr(feature = "serde", typetag::serde(tag = "tag"))]
pub trait NoiseModel: Debug + DynClone {
type Dim: DimName
where
Self: Sized;
fn dim(&self) -> usize
where
Self: Sized,
{
Self::Dim::DIM
}
fn whiten_vec(&self, v: VectorX) -> VectorX;
fn whiten_mat(&self, m: MatrixX) -> MatrixX;
}
dyn_clone::clone_trait_object!(NoiseModel);
#[cfg(feature = "serde")]
pub use register_noisemodel as tag_noise;
mod gaussian;
pub use gaussian::GaussianNoise;
mod unit;
pub use unit::UnitNoise;