jdsp icon indicating copy to clipboard operation
jdsp copied to clipboard

[Feature] Implement Fast Convolution and Cross-Correlation

Open skylarkgit opened this issue 1 month ago • 0 comments

Summary: This pull request introduces the implementation of fast convolution and cross-correlation methods using FFT (Fast Fourier Transform). It includes:

  • Implementation of fastConvolve and fastCrossCorrelate methods.
  • Support for different convolution modes: full, same, and valid.
  • Error handling for invalid modes.

When to Use Fast Convolution and Cross-Correlation:

  • Use these methods when dealing with large datasets or signals where performance is critical.
  • They are particularly beneficial in applications requiring real-time signal processing or where the convolution/cross-correlation operation is a bottleneck.
  • Suitable for high-performance computing environments and scenarios involving repeated calculations on similar-sized data.

Details:

  1. Fast Convolution:

    • Implements the fastConvolve method which performs convolution using FFT.
    • Supports full, same, and valid modes.
    • Includes proper error handling for invalid modes.
  2. Fast Cross-Correlation:

    • Implements the fastCrossCorrelate method which performs cross-correlation using fastConvolve.
    • Supports full, same, and valid modes.

Changes Made:

  • Added fastConvolve and fastCrossCorrelate methods in the respective classes.
  • Added detailed comments and documentation to explain the methods and parameters.
  • Included error handling for invalid modes.

Testing:

  • Tested the methods with different modes (full, same, valid) to ensure correctness.

skylarkgit avatar Jun 03 '24 08:06 skylarkgit