Functions

fft.hpp File Reference

Contains utility functions for performing the fast fourier transform and its inverse. More...

#include <vector>
#include <complex>
#include <fftw3.h>
#include "types.hpp"

Go to the source code of this file.

Functions

complex_vec padded_FFT (real_vec &in)
 Performs a fast fourier transform.
real_vec padded_IFFT (complex_vec &in)
 Performs a fast inverse fourier transform.

Detailed Description

Contains utility functions for performing the fast fourier transform and its inverse.

It uses the FFTW3 library to perform the transforms. For better performance, the functions temporarily change the size of the input vector by padding it with zeros to a size that can be expressed as a product of small primes, that is 2^x * 3^y * 5^z.

Definition in file fft.hpp.


Function Documentation

complex_vec padded_FFT ( real_vec in  ) 

Performs a fast fourier transform.

The input vector is padded with zeros for better performance and shrunk again to original size when the transform is done.

Definition at line 26 of file fft.cpp.

real_vec padded_IFFT ( complex_vec in  ) 

Performs a fast inverse fourier transform.

The input vector is destroyed in the process!

Definition at line 44 of file fft.cpp.