Struct MultilevelDWTResult
pub struct MultilevelDWTResult<T: SignalType> {
pub approximation: Signal<T>,
pub details: Vec<Signal<T>>,
pub levels: usize,
pub original_length: usize,
pub per_level_lengths: Vec<usize>,
}Expand description
Result of a multi-level DWT
Fields§
§approximation: Signal<T>Final approximation coefficients
details: Vec<Signal<T>>Detail coefficients at each level (from finest to coarsest)
levels: usizeNumber of decomposition levels
original_length: usizeLength of the original input signal (the input fed to dwt_multilevel).
per_level_lengths: Vec<usize>Per-level original input lengths (finest level first). per_level_lengths[0]
equals original_length; per_level_lengths[i] is the input length at
level i, which is the previous level’s approximation length. Stored
because M and L alone cannot determine whether the source was
N = 2M − L + 1 or N = 2M − L + 2 (parity ambiguity), so each
inverse step needs the recorded length to truncate canonically.
Implementations§
§impl<T: SignalType> MultilevelDWTResult<T>
impl<T: SignalType> MultilevelDWTResult<T>
pub fn new(
approximation: Signal<T>,
details: Vec<Signal<T>>,
per_level_lengths: Vec<usize>,
) -> Result<Self>
pub fn new( approximation: Signal<T>, details: Vec<Signal<T>>, per_level_lengths: Vec<usize>, ) -> Result<Self>
Construct a MultilevelDWTResult.
per_level_lengths[0] should equal the original input length and
each subsequent entry the input length at that level (i.e. the
previous level’s approximation length).
Returns Err(WaveletError::InvalidParameter) if per_level_lengths
length doesn’t match details.len() — without this check the
inverse cascade would silently produce wrong-length output.
Trait Implementations§
§impl<T: Clone + SignalType> Clone for MultilevelDWTResult<T>
impl<T: Clone + SignalType> Clone for MultilevelDWTResult<T>
§fn clone(&self) -> MultilevelDWTResult<T>
fn clone(&self) -> MultilevelDWTResult<T>
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl<T: Debug + SignalType> Debug for MultilevelDWTResult<T>
impl<T: Debug + SignalType> Debug for MultilevelDWTResult<T>
Auto Trait Implementations§
impl<T> Freeze for MultilevelDWTResult<T>
impl<T> RefUnwindSafe for MultilevelDWTResult<T>where
T: RefUnwindSafe,
impl<T> Send for MultilevelDWTResult<T>
impl<T> Sync for MultilevelDWTResult<T>
impl<T> Unpin for MultilevelDWTResult<T>where
T: Unpin,
impl<T> UnwindSafe for MultilevelDWTResult<T>where
T: UnwindSafe,
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.