FFT Class |
The FFT class provides methods for computing the FFT (Fast-Fourier Transform), inverse FFT, linear convolution, and circular convolution of a complex array.
It is a bare-bones implementation that runs in N log N time, where N is the length of the complex array. For simplicity, N must be a power of 2.
Our goal is to optimize the clarity of the code, rather than performance. It is not the most memory efficient implementation because it uses objects to represents complex numbers and it it re-allocates memory for the subarray, instead of doing in-place or reusing a single temporary array.
Namespace: Algs4Net
public class FFT
The FFT type exposes the following members.
Name | Description | |
---|---|---|
![]() ![]() | Cconvolve |
Returns the circular convolution of the two specified complex arrays. |
![]() ![]() | Convolve |
Returns the linear convolution of the two specified complex arrays. |
![]() ![]() | Fft | Returns the FFT of the specified complex array. |
![]() ![]() | Ifft |
Returns the inverse FFT of the specified complex array. |
![]() ![]() | MainTest |
Demo test the FFT class. |
For additional documentation, see Section 9.9 of Algorithms, 4th Edition by Robert Sedgewick and Kevin Wayne.
This class is a C# port from the original Java class FFT implementation by the respective authors.