BattleLemarieWavelet<T>

Models & Types · AiDotNet.WaveletFunctions

Implements the Battle-Lemarie wavelet function, which is a smooth, orthogonal wavelet based on B-splines.

Inheritance: WaveletFunctionBase<T> → BattleLemarieWavelet<T>

For Beginners

A wavelet is a mathematical function used to divide a signal into different frequency components. Think of it as a special kind of lens that lets you examine different details of a signal.

The Battle-Lemarie wavelet is particularly useful because:

  • It’s smooth, which helps avoid artifacts in signal processing
  • It has good localization in both time and frequency domains
  • It can be adjusted (via the order parameter) to balance between time and frequency resolution

You might use this wavelet for:

  • Image compression
  • Noise reduction
  • Feature extraction from signals
  • Analyzing signals with different scales of detail

The higher the order, the smoother the wavelet, but also the wider its support (meaning it considers more neighboring points when analyzing a signal).

How It Works

The Battle-Lemarie wavelet is a family of orthogonal wavelets constructed from B-spline functions. It offers good frequency localization and smoothness properties, making it useful for signal analysis where both time and frequency resolution are important.

Example

using AiDotNet.WaveletFunctions;

var wavelet = new BattleLemarieWavelet<double>();
double value = wavelet.Calculate(0.5);
Console.WriteLine($"BattleLemarieWavelet: psi(0.5) = {value:F4}");

Constructors

Constructor Summary
BattleLemarieWavelet(int order) Initializes a new instance of the BattleLemarieWavelet class with the specified order.

Methods

Method Summary
T Calculate(T x) Calculates the value of the Battle-Lemarie wavelet function at point x.
ValueTuple<Vector<T>, Vector<T>> Decompose(Vector<T> input) Decomposes an input signal into approximation and detail coefficients using the Battle-Lemarie wavelet.
Vector<T> GetScalingCoefficients() Gets the scaling function coefficients for the Battle-Lemarie wavelet.
Vector<T> GetWaveletCoefficients() Gets the wavelet function coefficients for the Battle-Lemarie wavelet.
Vector<T> Reconstruct(Vector<T> approximation, Vector<T> detail) Reconstructs the original signal from approximation and detail coefficients.