Skip to content
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

FFT: Support arbitrary sized vectors using Bluestein's algorithm #77

Open
gsgou opened this issue Aug 21, 2023 · 4 comments
Open

FFT: Support arbitrary sized vectors using Bluestein's algorithm #77

gsgou opened this issue Aug 21, 2023 · 4 comments

Comments

@gsgou
Copy link
Contributor

gsgou commented Aug 21, 2023

could be based on mathnet-numerics implementation:
https://github.com/mathnet/mathnet-numerics/blob/master/src/Numerics/Providers/FourierTransform/ManagedFourierTransformProvider.Bluestein.cs#L252

swharden added a commit that referenced this issue Aug 21, 2023
@swharden

This comment was marked as outdated.

@swharden
Copy link
Owner

swharden commented Aug 21, 2023

... okay this may be pretty easy actually. I found this, and this could be as easy as copy/pasting it in. It looks to be under a MIT license:

https://www.nayuki.io/res/free-small-fft-in-multiple-languages/Fft.cs

@swharden swharden reopened this Aug 22, 2023
swharden added a commit that referenced this issue Aug 22, 2023
addresses #77

future work is needed to add this to the main API and take over when FFT is given data with a length that is not a power of 2
@swharden
Copy link
Owner

This needs more work so I'm leaving it in the Experimental namespace so I can publish the package right now, but we can test this a little more thoroughly and add it into the main API soon. I'm merging #80 in so we both have access to the code if/when one of us decides to pick it up!

// this will work when I publish the new package in a few minutes
double[] prime = { 1, 2, 3, 4, 5, 6, 7 };
System.Numerics.Complex[] result = FftSharp.Experimental.Bluestein(prime);

@swharden swharden changed the title implement Bluesteins generic FFT for arbitrary sized sample vectors, including prime sizes FFT: Support arbitrary sized vectors using Bluestein's algorithm Aug 22, 2023
@gsgou
Copy link
Contributor Author

gsgou commented Aug 22, 2023

tks a lot @swharden, we can catch up on this at a later time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants