use scirs2_core::numeric::Float;
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum ExtrapolationMethod {
Error,
Constant,
Linear,
Quadratic,
Cubic,
Periodic,
Reflection,
Exponential,
PowerLaw,
Spline,
Akima,
Sinusoidal,
Rational,
Confidence,
Ensemble,
Adaptive,
Autoregressive,
Zeros,
Nearest,
Mirror,
Wrap,
Clamped,
GridMirror,
GridConstant,
GridWrap,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum ExtrapolationDirection {
Lower,
Upper,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum EnsembleCombinationStrategy {
Mean,
WeightedMean,
Median,
BestMethod,
MinimumVariance,
BayesianAveraging,
Voting,
Stacking,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum AdaptiveSelectionCriterion {
CrossValidationError,
BoundarySmoothness,
CurvatureContinuity,
PhysicsConsistency,
UncertaintyMinimization,
DomainSpecific,
InformationCriterion,
MultiCriteria,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum ARFittingMethod {
YuleWalker,
Burg,
LeastSquares,
MaximumLikelihood,
ModifiedCovariance,
ForwardBackward,
}
#[derive(Debug, Clone, Copy)]
pub enum PhysicsLaw {
MassConservation,
EnergyConservation,
MomentumConservation,
}
#[derive(Debug, Clone, Copy)]
pub enum BoundaryType {
Dirichlet,
Neumann,
Robin,
Absorbing,
}
#[derive(Debug, Clone)]
pub struct DataCharacteristics<T: Float> {
pub is_periodic: bool,
pub estimated_period: Option<T>,
pub is_monotonic: bool,
pub is_exponential_like: bool,
pub is_oscillatory: bool,
pub characteristic_scale: T,
}
impl<T: Float> Default for DataCharacteristics<T> {
fn default() -> Self {
Self {
is_periodic: false,
estimated_period: None,
is_monotonic: false,
is_exponential_like: false,
is_oscillatory: false,
characteristic_scale: T::one(),
}
}
}
impl<T: Float> DataCharacteristics<T> {
pub fn new() -> Self {
Self::default()
}
pub fn with_periodic(mut self, periodic: bool, period: Option<T>) -> Self {
self.is_periodic = periodic;
self.estimated_period = period;
self
}
pub fn with_monotonic(mut self, monotonic: bool) -> Self {
self.is_monotonic = monotonic;
self
}
pub fn with_exponential_like(mut self, exponential: bool) -> Self {
self.is_exponential_like = exponential;
self
}
pub fn with_oscillatory(mut self, oscillatory: bool) -> Self {
self.is_oscillatory = oscillatory;
self
}
pub fn with_scale(mut self, scale: T) -> Self {
self.characteristic_scale = scale;
self
}
}