- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 342
 
Add Fast Fourier Transform (FFT) in R #242
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
base: master
Are you sure you want to change the base?
Conversation
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.
Pull Request Overview
Adds a recursive Cooley–Tukey FFT implementation in R with zero-padding to next power-of-two and accompanying documentation.
- Introduces fft_recursive with power-of-two padding and complex output
 - Adds documentation and usage examples
 - Includes an interactive example block in the R script
 
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 8 comments.
| File | Description | 
|---|---|
| mathematics/fast_fourier_transform.r | Adds the recursive FFT implementation, zero-padding helper, and an interactive example block | 
| documentation/fast_fourier_transform.md | Documents the FFT function, usage, and complexity notes | 
| @@ -0,0 +1,29 @@ | |||
| # Fast Fourier Transform (FFT) | |||
| 
               | 
          |||
| This file documents the recursive Cooley-Tukey FFT implementation added to `R/mathematics/fast_fourier_transform.r`. | |||
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.
Please remove this file, we don't add documentation separately from the source code
Overview
The
fft_recursivefunction decomposes a DFT of size N into smaller DFTs of even and odd indexed elements, recursively combining their results.If the input vector’s length is not a power of two, it is zero-padded to the next power of two for optimal performance.
This implementation serves as a clear, educational example of FFT internals while maintaining compatibility with complex input data.
Features
Complexity