TheAlgorithms/C++ 1.0.0
All the algorithms implemented in C++
|
An inverse fast Fourier transform (IFFT) is an algorithm that computes the inverse fourier transform. More...
#include <cassert>
#include <cmath>
#include <complex>
#include <cstdint>
#include <iostream>
#include <vector>
Go to the source code of this file.
Namespaces | |
namespace | numerical_methods |
for assert | |
Functions | |
std::complex< double > * | numerical_methods::InverseFastFourierTransform (std::complex< double > *p, uint8_t n) |
InverseFastFourierTransform is a recursive function which returns list of complex numbers. | |
static void | test () |
Self-test implementations. | |
int | main (int argc, char const *argv[]) |
Main function. | |
An inverse fast Fourier transform (IFFT) is an algorithm that computes the inverse fourier transform.
This algorithm has an application in use case scenario where a user wants find coefficients of a function in a short time by just using points generated by DFT. Time complexity this algorithm computes the IDFT in O(nlogn) time in comparison to traditional O(n^2).
Definition in file inverse_fast_fourier_transform.cpp.
int main | ( | int | argc, |
char const * | argv[] ) |
Main function.
argc | commandline argument count (ignored) |
argv | commandline array of arguments (ignored) calls automated test function to test the working of fast fourier transform. |
Definition at line 157 of file inverse_fast_fourier_transform.cpp.
|
static |
Self-test implementations.
Declaring two test cases and checking for the error in predicted and true value is less than 0.000000000001.
Test case 1
Test case 2
True Answer for test case 1
True Answer for test case 2
Comparing for both real and imaginary values for test case 1
Comparing for both real and imaginary values for test case 2
Definition at line 101 of file inverse_fast_fourier_transform.cpp.