Skip to main content

optirs_learned/adaptive/
gradientcharacteristics_traits.rs

1//! # GradientCharacteristics - Trait Implementations
2//!
3//! This module contains trait implementations for `GradientCharacteristics`.
4//!
5//! ## Implemented Traits
6//!
7//! - `Default`
8//!
9//! 🤖 Generated with [SplitRS](https://github.com/cool-japan/splitrs)
10
11use scirs2_core::numeric::Float;
12use std::fmt::Debug;
13
14use super::types::GradientCharacteristics;
15
16impl<T: Float + Debug + Send + Sync + 'static> Default for GradientCharacteristics<T> {
17    fn default() -> Self {
18        Self {
19            gradient_norm: scirs2_core::numeric::NumCast::from(0.1).unwrap_or_else(|| T::zero()),
20            consistency: scirs2_core::numeric::NumCast::from(0.8).unwrap_or_else(|| T::zero()),
21            noise_ratio: scirs2_core::numeric::NumCast::from(0.1).unwrap_or_else(|| T::zero()),
22            correlation: scirs2_core::numeric::NumCast::from(0.7).unwrap_or_else(|| T::zero()),
23        }
24    }
25}