Enum BoundaryDetection
#[non_exhaustive]pub enum BoundaryDetection {
LocalMaxMinima {
min_peak_separation: f64,
},
Adaptive {
sensitivity: f64,
},
Manual(Vec<f64>),
}Expand description
How to locate the N Fourier-domain boundaries ω_n ∈ (0, π) that
partition the signal’s spectrum into adaptive bands.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
LocalMaxMinima
Gilles 2013 §III.A: find local maxima of the (preprocessed) magnitude
spectrum, keep the strongest peaks (subject to min_peak_separation
in normalized frequency [0, π]), and place each boundary at the
argmin of the spectrum between consecutive peaks.
Fields
Adaptive
Gilles & Heal 2014 scale-space approach. The (preprocessed) spectrum
is Gaussian-smoothed with a width controlled by sensitivity; peaks
surviving the smoothing seed the boundaries. The current
implementation is a single-scale simplification of the paper’s
persistence-tracking algorithm — it is enough to keep the recovered
band count stable under SNR ≥ 20 dB noise (issue acceptance criterion
#4) but does not yet expose per-mode lifetimes.
Fields
sensitivity: f640 < sensitivity ≤ 1. Smaller values smooth more aggressively
(fewer, stabler peaks) — this is the inverse of the DSP
convention where higher sensitivity means more responsive
detection; here it means less smoothing applied before
detection, so a peakier spectrum survives. Default 0.5
smooths to roughly 2.5 % of the half-spectrum width; at
sensitivity = 1 σ drops to zero and the detector falls
back to gaussian_smooth’s one-sample floor.
Manual(Vec<f64>)
Caller-supplied boundaries in (0, ω_max) where
ω_max = 2π · (n / 2) / n is the highest representable DFT bin
frequency for the signal — exactly π for even n, but
π · (n − 1) / n for odd n. Boundaries must be strictly
increasing and contain at most EWTConfig::max_bands entries.
Boundaries above ω_max are rejected by ewt rather than
silently producing an all-zero last component.
Trait Implementations§
§impl Clone for BoundaryDetection
impl Clone for BoundaryDetection
§fn clone(&self) -> BoundaryDetection
fn clone(&self) -> BoundaryDetection
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for BoundaryDetection
impl RefUnwindSafe for BoundaryDetection
impl Send for BoundaryDetection
impl Sync for BoundaryDetection
impl Unpin for BoundaryDetection
impl UnwindSafe for BoundaryDetection
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.