-
Notifications
You must be signed in to change notification settings - Fork 51
Add support for System.Numerics.Complex[] #61
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
Comments
Hi @AlexandrSpirin, this is a good question! I think the reason I implemented my own complex number class is so it could be minimal and simple, and easily ported to other languages. Compare the complexity of these two classes: I recognize that people who already have data in FftSharp/src/FftSharp/Transform.cs Lines 20 to 66 in 8015e0d
If you want to create a PR I would be happy to review it! Bonus points for demonstrating the new usage in the readme and in a new test. If you decide not to that's okay, I'll leave this issue open and implement this next time I work in this code base. Thanks again for pointing this out! |
Following-up, I'm moving these methods into their own static class with a simpler API that resembles Math.NET // Apply FFT in place
System.Numerics.Complex[] samples = { /* */ };
FftSharp.FFT.Forward(samples); // Get FFT from real data array
double[] samples = { /* */ };
System.Numerics.Complex[] fft = FftSharp.FFT.Forward(samples); The |
Simple methods which act on System.Numeric.Complex data types #61
Why do you use your own Complex class for complex numbers, now C# has a built-in class and it looks like it can do the same thing as yours?
The text was updated successfully, but these errors were encountered: