Class WaveletOperations
java.lang.Object
com.morphiqlabs.wavelet.WaveletOperations
Public facade for wavelet transform operations (core module, scalar).
This class provides access to the core wavelet operations needed by transform implementations while hiding internal implementation details.
SIMD Acceleration: Vector API–based acceleration lives in
the optional
vectorwave-extensions module (Java 25 + incubator API). The core
module remains
portable and scalar; use the extensions for high‑throughput SIMD paths.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordPerformance information record about wavelet operations on this platform. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcircularConvolveMODWT(double[] signal, double[] filter, double[] output) Performs circular convolution for MODWT without downsampling.Gets performance information about the current platform's capabilities.static double[]hardThreshold(double[] coefficients, double threshold) Applies hard thresholding to wavelet coefficients.static double[]softThreshold(double[] coefficients, double threshold) Applies soft thresholding to wavelet coefficients.static voidsymmetricConvolveMODWT(double[] signal, double[] filter, double[] output) Performs symmetric-extension convolution for MODWT without downsampling.static voidzeroPaddingConvolveMODWT(double[] signal, double[] filter, double[] output) Performs zero-padding convolution for MODWT without downsampling.
-
Method Details
-
circularConvolveMODWT
public static void circularConvolveMODWT(double[] signal, double[] filter, double[] output) Performs circular convolution for MODWT without downsampling.- Parameters:
signal- input signalfilter- wavelet filter coefficientsoutput- pre-allocated output array (same length as signal)
-
zeroPaddingConvolveMODWT
public static void zeroPaddingConvolveMODWT(double[] signal, double[] filter, double[] output) Performs zero-padding convolution for MODWT without downsampling.- Parameters:
signal- input signalfilter- wavelet filter coefficientsoutput- pre-allocated output array (same length as signal)
-
symmetricConvolveMODWT
public static void symmetricConvolveMODWT(double[] signal, double[] filter, double[] output) Performs symmetric-extension convolution for MODWT without downsampling.- Parameters:
signal- input signalfilter- wavelet filter coefficientsoutput- pre-allocated output array (same length as signal)
-
getPerformanceInfo
Gets performance information about the current platform's capabilities.- Returns:
- performance information including vectorization status
-
softThreshold
public static double[] softThreshold(double[] coefficients, double threshold) Applies soft thresholding to wavelet coefficients.Soft thresholding shrinks coefficients toward zero by the threshold amount:
- If |x| ≤ threshold: result = 0
- If x > threshold: result = x - threshold
- If x < -threshold: result = x + threshold
- Parameters:
coefficients- the wavelet coefficients to thresholdthreshold- the threshold value (must be non-negative)- Returns:
- new array with thresholded coefficients
- Throws:
IllegalArgumentException- if threshold is negative
-
hardThreshold
public static double[] hardThreshold(double[] coefficients, double threshold) Applies hard thresholding to wavelet coefficients.Hard thresholding sets coefficients to zero if their absolute value is less than or equal to the threshold:
- If |x| ≤ threshold: result = 0
- If |x| > threshold: result = x
- Parameters:
coefficients- the wavelet coefficients to thresholdthreshold- the threshold value (must be non-negative)- Returns:
- new array with thresholded coefficients
- Throws:
IllegalArgumentException- if threshold is negative
-