Update fast_fourier_transform.cpp

This commit is contained in:
Ameya Chawla 2021-10-23 11:13:00 +05:30 committed by GitHub
parent 9b2efd2f37
commit c7dcd92d1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,9 +51,9 @@ std::complex<double>* FastFourierTransform(std::complex<double>*p,uint8_t n)
std::complex<double> om=std::complex<double>(cos(2*pi/n),sin(2*pi/n)); ///Calculating value of omega
std::complex<double> *pe= new std::complex<double>[n/2]; /// Coefficients of even power
auto *pe= new std::complex<double>[n/2]; /// Coefficients of even power
std::complex<double> *po= new std::complex<double>[n/2]; ///Coefficients of odd power
auto *po= new std::complex<double>[n/2]; ///Coefficients of odd power
int k1=0,k2=0;
for(int j=0;j<n;j++)
@ -71,7 +71,7 @@ std::complex<double>* FastFourierTransform(std::complex<double>*p,uint8_t n)
std::complex<double> *yo=FastFourierTransform(po,n/2); ///Recursive Call
std::complex<double> *y=new std::complex<double>[n]; /// Final value representation list
auto *y=new std::complex<double>[n]; /// Final value representation list
k1=0,k2=0;