Class WaveletOperations

java.lang.Object
com.morphiqlabs.wavelet.WaveletOperations

public final class WaveletOperations extends Object
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 Classes
    Modifier and Type
    Class
    Description
    static final record 
    Performance information record about wavelet operations on this platform.
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    circularConvolveMODWT(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 void
    symmetricConvolveMODWT(double[] signal, double[] filter, double[] output)
    Performs symmetric-extension convolution for MODWT without downsampling.
    static void
    zeroPaddingConvolveMODWT(double[] signal, double[] filter, double[] output)
    Performs zero-padding convolution for MODWT without downsampling.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • circularConvolveMODWT

      public static void circularConvolveMODWT(double[] signal, double[] filter, double[] output)
      Performs circular convolution for MODWT without downsampling.
      Parameters:
      signal - input signal
      filter - wavelet filter coefficients
      output - 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 signal
      filter - wavelet filter coefficients
      output - 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 signal
      filter - wavelet filter coefficients
      output - pre-allocated output array (same length as signal)
    • getPerformanceInfo

      public static WaveletOperations.PerformanceInfo 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 threshold
      threshold - 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 threshold
      threshold - the threshold value (must be non-negative)
      Returns:
      new array with thresholded coefficients
      Throws:
      IllegalArgumentException - if threshold is negative