pub struct DiscreteWaveletTransform;Expand description
Collection of discrete wavelet transform (DWT) utility functions.
Includes single-level and multi-level Haar DWT, energy, and entropy computations.
Implementations§
Source§impl DiscreteWaveletTransform
impl DiscreteWaveletTransform
Sourcepub fn dwt_haar(signal: &[f64]) -> Vec<f64>
pub fn dwt_haar(signal: &[f64]) -> Vec<f64>
Compute the full Haar DWT of a signal.
Returns a coefficient vector in the standard DWT layout:
[approx_coarsest ... detail_level1].
Sourcepub fn idwt_haar(coeffs: &[f64]) -> Vec<f64>
pub fn idwt_haar(coeffs: &[f64]) -> Vec<f64>
Invert the Haar DWT produced by DiscreteWaveletTransform::dwt_haar.
Sourcepub fn dwt_level(signal: &[f64], level: usize) -> Vec<f64>
pub fn dwt_level(signal: &[f64], level: usize) -> Vec<f64>
Compute the DWT coefficients at a specific decomposition level.
Returns only the approximation coefficients after level Haar forward
steps.
Sourcepub fn wavelet_energy(coeffs: &[f64]) -> f64
pub fn wavelet_energy(coeffs: &[f64]) -> f64
Compute the total energy (sum of squared coefficients) of a wavelet coefficient array.
Sourcepub fn wavelet_entropy(coeffs: &[f64]) -> f64
pub fn wavelet_entropy(coeffs: &[f64]) -> f64
Compute the Shannon entropy of a normalized wavelet coefficient array.
Coefficients are normalized by total energy before computing entropy.
Auto Trait Implementations§
impl Freeze for DiscreteWaveletTransform
impl RefUnwindSafe for DiscreteWaveletTransform
impl Send for DiscreteWaveletTransform
impl Sync for DiscreteWaveletTransform
impl Unpin for DiscreteWaveletTransform
impl UnsafeUnpin for DiscreteWaveletTransform
impl UnwindSafe for DiscreteWaveletTransform
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.