-
-
Notifications
You must be signed in to change notification settings - Fork 46.7k
Add radix2 FFT #1166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add radix2 FFT #1166
Conversation
Created a dynamic implementation of the radix - 2 Fast Fourier Transform for fast polynomial multiplication. Reference: https://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm#The_radix-2_DIT_case
maths/radix2_fft.py
Outdated
B = "B = " | ||
C = "A*B = " | ||
for i in range(self.len_A): | ||
A += str(self.polyA[i]) + "*x^" + str(i) + " + " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A += f"{self.polyA[i]}*x^{i} + "
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated the __str__
method using f prefix for clarity and list comprehension+String.join() for performance.
Improved the printing method with f.prefix and String.join()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New commit d932f15 looks good!
* Add radix2 FFT Created a dynamic implementation of the radix - 2 Fast Fourier Transform for fast polynomial multiplication. Reference: https://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm#The_radix-2_DIT_case * Rename radix2_FFT.py to radix2_fft.py * Update radix2_fft printing Improved the printing method with f.prefix and String.join() * __str__ method update * Turned the tests into doctests
Created a dynamic implementation of the radix - 2 Fast Fourier Transform for fast polynomial multiplication.
Reference: https://en.wikipedia.org/wiki/Cooley%E2%80%93Tukey_FFT_algorithm#The_radix-2_DIT_case