Add 2D FFT utils - #168
Add 2D FFT utils#168JulianKnodt wants to merge 1 commit into
Conversation
|
RustFFT is a pretty old project now. I wrote the original code almost 10 years ago. Way back when it was in active development, const generics weren't available yet, and without those, any utility for generic m-d ffts would require allocation, and kept me from committing to it. Now that const generics are available, I think that's the way to go for a multi-dimensional FFT utility. What I'd like to see is a struct just like this, but instead of just being pure 2D, it takes a const generic for number of dimensions. The hardest part (for me at least) would be implementing a generic multidimensional transpose. But the fact that that's hard means it would be a good value to provide to library users. |
|
Don't worry about the 1.61 failures that's unrelated to this PR, I forsee upgrading our MSRV in the next release so we aren't falling too behind utilities like this. |
|
I was thinking whether it would be good to make it more abstract, and that's certainly possible, but I thought most applications would only need 2D. You'd want a generic version before merging though, eh? |
|
Should this be part of RustFFT, or a separate crate? A separate crate can make breaking changes much easier, might be useful, especially in the beginning. When I started on the realfft crate I had some ideas that it should be part of RustFFT, but it has been quite useful to have it separate. |
|
More often than not, people want to use FFT for images, so I think that keeping it in the same library makes more sense than requiring someone to hunt for two libraries. It's also a relatively small chunk of code (for now). If it were to become bigger, then it may make sense to split it out, but I don't want to make a micro-library. As for versioning/stability within a crate, it could be hidden behind a feature flag temporarily, although that's a bit of a pain. |
|
I've opened pull request #181 to add multidimensional FFTs as a first-class feature of the library. I'd love some feedback from people here about the API and whether it coverts your needs. It supersedes this one because the new one allows for arbitrary dimensionality, not just 2d. |
Add utilities for computing 2D FFTs
I didn't add doc comments yet, since I'm not sure if this is the way that the author would want this written. If it is, then I can create doc comments and clean it up a bit more.
Doesn't address 3D transforms i.e. (#85), but fixes #146.