Skip to content

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

Merged
merged 5 commits into from
Sep 6, 2019
Merged

Add radix2 FFT #1166

merged 5 commits into from
Sep 6, 2019

Conversation

KirilBangachev
Copy link
Contributor

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

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
B = "B = "
C = "A*B = "
for i in range(self.len_A):
A += str(self.polyA[i]) + "*x^" + str(i) + " + "
Copy link
Member

@cclauss cclauss Sep 2, 2019

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} + "

Copy link
Contributor Author

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()
Copy link
Member

@harshildarji harshildarji left a 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!

@harshildarji harshildarji added the awaiting merge This PR is approved and ready to be merged label Sep 5, 2019
@cclauss cclauss merged commit a41a14f into TheAlgorithms:master Sep 6, 2019
stokhos pushed a commit to stokhos/Python that referenced this pull request Jan 3, 2021
* 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
@cclauss cclauss mentioned this pull request May 8, 2025
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting merge This PR is approved and ready to be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants