|
Algorithms_in_C++ 1.0.0
Set of 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 <iostream>#include <vector>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. More... | |
| static void | test () |
| Self-test implementations. More... | |
| int | main (int argc, char const *argv[]) |
| Main function. More... | |
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).
| 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. |
|
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