Expand description
Discrete Wavelet Transform (DWT) primitive: single-level orthonormal filter bank.
This module provides the numerical core of the wavelet milestone: the
orthonormal Daubechies filter tables (Haar/db1 through db10, in filters) and
one single-level DWT step that perfectly reconstructs its input.
- Analysis ([
single_level_analysis]): a signal is convolved with the analysis low-pass filter (dec_lo) and high-pass filter (dec_hi), then downsampled by 2, yielding an approximation and a detail coefficient vector. UnderBoundaryMode::Periodiceach has lengthceil(n/2); underBoundaryMode::Symmetriceach has lengthn(the signal is mirror-extended to2ninternally). - Synthesis ([
single_level_synthesis]): the exact inverse of analysis — the approximation and detail are scattered back through the transpose of the orthogonal even-length core and summed to reconstruct the original signal.
Two boundary handling modes (BoundaryMode) are supported, and analysis /
synthesis form an exact adjoint pair under each independently:
BoundaryMode::Periodic— circular (wrap-around) convolution; the signal is used as-is when even, or extended by one sample when odd.BoundaryMode::Symmetric— half-point boundary reflection; the signal is mirror-extended to length2ninternally.
Both modes route through one orthogonal even-length periodic core whose transpose
is its exact inverse, so single-level analysis followed by synthesis reconstructs
any signal of any length to ≤1e-10 relative error for every in-scope family and
both boundary modes — the property multi-level (Mallat pyramid) construction
builds on. The rec_lo/rec_hi (time-reversed) synthesis filters are exposed on
[filters::FilterBank] for downstream use and verified by the filter-invariant
tests, though this single-level engine reconstructs via the core transpose.
No crate-root or prelude re-exports are added in this phase (deferred to a later
phase); the module is reachable only as crate::wavelet::....
Modules§
- filters
- Orthonormal Daubechies filter-coefficient tables and family → filter-bank lookup.
- regression
- Wavelet-domain scalar-on-function regression (
wcr, WAV-03).
Structs§
- Wavelet
Coeffs - Multi-level orthogonal DWT coefficients (the Mallat pyramid) for one signal.
Enums§
- Boundary
Mode - Boundary handling for the single-level convolution/downsampling step.
- Wavelet
Family - A wavelet family: Haar (db1) or Daubechies of a given vanishing-moment order.
Functions§
- decompose
- Multi-level orthogonal DWT: decompose a signal into a Mallat coefficient pyramid.
- decompose_
matrix - Multi-level orthogonal DWT over every row (curve) of an [
FdMatrix]. - max_
level - Maximum useful decomposition depth for a signal of length
signal_len. - reconstruct
- Invert
decompose: reconstruct the original signal from a coefficient pyramid.