Click or drag to resize
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.

Inheritance Hierarchy
SystemObject
  Algs4NetFFT

Namespace: Algs4Net
Assembly: Algs4Net (in Algs4Net.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public class FFT

The FFT type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCconvolve
Returns the circular convolution of the two specified complex arrays.
Public methodStatic memberConvolve
Returns the linear convolution of the two specified complex arrays.
Public methodStatic memberFft
Returns the FFT of the specified complex array.
Public methodStatic memberIfft
Returns the inverse FFT of the specified complex array.
Public methodStatic memberMainTest
Demo test the FFT class.
Top
Remarks

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.

See Also