Struct EWTConfig
#[non_exhaustive]pub struct EWTConfig {
pub max_bands: usize,
pub boundary_detection: BoundaryDetection,
pub spectrum_preproc: SpectrumPreproc,
pub gamma_strategy: GammaStrategy,
pub log_spectrum: bool,
}Expand description
Configuration for ewt.
Builder-style setters mirror super::ceemdan::CEEMDAN; the struct is
#[non_exhaustive] so downstream callers must construct via
EWTConfig::default (or one of the preset constructors) and chain
with_* methods.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_bands: usizeHard upper bound on the number of detected boundaries N. The
returned EWTResult::components has length N + 1 (one scaling
band plus N wavelet bands). Default 8.
boundary_detection: BoundaryDetectionBoundary-detection strategy. Default
BoundaryDetection::LocalMaxMinima with min_peak_separation = π / 16.
spectrum_preproc: SpectrumPreprocSpectrum preprocessing applied before peak detection. Default
SpectrumPreproc::None.
gamma_strategy: GammaStrategyTransition-width strategy. Default GammaStrategy::Auto.
log_spectrum: boolUse ln(1 + |X(ω)|) instead of |X(ω)| for peak detection. The
log-spectrum compresses dynamic range so weaker harmonics survive
alongside dominant tones. Default true.
Implementations§
§impl EWTConfig
impl EWTConfig
pub fn with_max_bands(self, max_bands: usize) -> Self
pub fn with_max_bands(self, max_bands: usize) -> Self
Pin the upper bound on detected bands.
pub fn with_boundary_detection(self, strategy: BoundaryDetection) -> Self
pub fn with_boundary_detection(self, strategy: BoundaryDetection) -> Self
Override the boundary-detection strategy.
pub fn with_spectrum_preproc(self, preproc: SpectrumPreproc) -> Self
pub fn with_spectrum_preproc(self, preproc: SpectrumPreproc) -> Self
Override the spectrum preprocessing.
pub fn with_gamma_strategy(self, strategy: GammaStrategy) -> Self
pub fn with_gamma_strategy(self, strategy: GammaStrategy) -> Self
Override the γ strategy.
pub fn with_log_spectrum(self, log_spectrum: bool) -> Self
pub fn with_log_spectrum(self, log_spectrum: bool) -> Self
Toggle the log-spectrum compression.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for EWTConfig
impl RefUnwindSafe for EWTConfig
impl Send for EWTConfig
impl Sync for EWTConfig
impl Unpin for EWTConfig
impl UnwindSafe for EWTConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§impl<T> IntoEither for T
impl<T> IntoEither for T
§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.