#[derive(Debug, Clone, Copy, PartialEq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct NichingConfiguration {
pub enabled: bool,
pub sigma_share: f64,
pub alpha: f64,
}
impl Default for NichingConfiguration {
fn default() -> Self {
NichingConfiguration {
enabled: false,
sigma_share: 1.0,
alpha: 1.0,
}
}
}
impl NichingConfiguration {
pub fn new() -> Self {
Self::default()
}
pub fn with_enabled(mut self, enabled: bool) -> Self {
self.enabled = enabled;
self
}
pub fn with_sigma_share(mut self, sigma_share: f64) -> Self {
self.sigma_share = sigma_share;
self
}
pub fn with_alpha(mut self, alpha: f64) -> Self {
self.alpha = alpha;
self
}
}