Expand description
Signal Decomposition Module
Provides methods for decomposing signals into sparse or adaptive representations.
This module currently implements Matching Pursuit (MP) and Orthogonal Matching Pursuit (OMP) algorithms for sparse signal decomposition using wavelet dictionaries.
§Quick Start
The most commonly used types and functions are re-exported at the module level for convenient access:
use iron_wave::decomposition::{
orthogonal_matching_pursuit, // OMP algorithm
matching_pursuit, // MP algorithm
WaveletDictionary, // Pre-computed wavelet dictionary
AtomIndex, // Atom identifier
MatchingPursuitResult, // Result type
};
// Create a signal and dictionary
let signal = Signal::new(vec![1.0, 2.0, 3.0, 4.0]);
let wavelets = vec![Box::new(Haar::new()) as Box<dyn Wavelet>];
let dict = WaveletDictionary::new(wavelets, 2, 4)?;
// Run OMP
let result = orthogonal_matching_pursuit(&signal, &dict, 10, 1e-6)?;
println!("Used {} atoms", result.atoms_used.len());Alternatively, you can import from the submodule directly:
use iron_wave::decomposition::matching_pursuit::{
orthogonal_matching_pursuit,
WaveletDictionary,
};§Modules
matching_pursuit: Sparse signal decomposition using adaptive dictionaries- Implements Matching Pursuit (MP) and Orthogonal Matching Pursuit (OMP)
- Provides
WaveletDictionaryfor pre-computed wavelet atoms - See module documentation for detailed examples and mathematical background
Re-exports§
pub use matching_pursuit::matching_pursuit;pub use matching_pursuit::orthogonal_matching_pursuit;pub use matching_pursuit::Dictionary;pub use matching_pursuit::AtomIndex;pub use matching_pursuit::MatchingPursuitResult;pub use matching_pursuit::WaveletDictionary;
Modules§
- matching_
pursuit - Matching Pursuit Module