ndrustfft
ndrustfft: n-dimensional complex-to-complex FFT, real-to-complex FFT and real-to-real DCT
This library is a wrapper for RustFFT
that enables performing FFTs of complex-, real-valued
data and DCT's on n-dimensional arrays (ndarray).
ndrustfft provides Handler structs for FFT's and DCTs, which must be provided to the respective ndrfft, nddct function alongside with Arrays. The Handlers contain the transform plans and buffers which reduce allocation cost. The Handlers implement a process function, which is a wrapper around Rustfft's process function with additional steps, i.e. to provide a real-to complex fft, or to construct the discrete cosine transform (dct) from a classical fft.
The transform along the outermost axis are the cheapest, while transforms along other axis' need to copy data temporary.
Parallel
The library ships all functions with a parallel version which leverages the parallel abilities of ndarray.
Example
2-Dimensional real-to-complex fft along first axis
use ;
use ;
let = ;
let mut data = zeros;
let mut vhat = zeros;
for in data.iter_mut.enumerate
let mut fft_handler: = new;
ndrfft;
License: MIT