pub struct Dft<T> { /* private fields */ }
Expand description
Naive O(n^2 ) Discrete Fourier Transform implementation
This implementation is primarily used to test other FFT algorithms.
// Computes a naive DFT of size 123
use rustfft::algorithm::Dft;
use rustfft::{Fft, FftDirection};
use rustfft::num_complex::Complex;
let mut buffer = vec![Complex{ re: 0.0f32, im: 0.0f32 }; 123];
let dft = Dft::new(123, FftDirection::Forward);
dft.process(&mut buffer);
Implementations§
Trait Implementations§
Source§impl<T> Direction for Dft<T>
impl<T> Direction for Dft<T>
Source§fn fft_direction(&self) -> FftDirection
fn fft_direction(&self) -> FftDirection
Returns FftDirection::Forward if this instance computes forward FFTs, or FftDirection::Inverse for inverse FFTs
Source§impl<T: FftNum> Fft<T> for Dft<T>
impl<T: FftNum> Fft<T> for Dft<T>
Source§fn process_outofplace_with_scratch(
&self,
input: &mut [Complex<T>],
output: &mut [Complex<T>],
_scratch: &mut [Complex<T>],
)
fn process_outofplace_with_scratch( &self, input: &mut [Complex<T>], output: &mut [Complex<T>], _scratch: &mut [Complex<T>], )
Divides
input
and output
into chunks of size self.len()
, and computes a FFT on each chunk. Read moreSource§fn process_with_scratch(
&self,
buffer: &mut [Complex<T>],
scratch: &mut [Complex<T>],
)
fn process_with_scratch( &self, buffer: &mut [Complex<T>], scratch: &mut [Complex<T>], )
Source§fn get_inplace_scratch_len(&self) -> usize
fn get_inplace_scratch_len(&self) -> usize
Returns the size of the scratch buffer required by
process_with_scratch
Read moreSource§fn get_outofplace_scratch_len(&self) -> usize
fn get_outofplace_scratch_len(&self) -> usize
Returns the size of the scratch buffer required by
process_outofplace_with_scratch
Read moreAuto Trait Implementations§
impl<T> Freeze for Dft<T>
impl<T> RefUnwindSafe for Dft<T>where
T: RefUnwindSafe,
impl<T> Send for Dft<T>where
T: Send,
impl<T> Sync for Dft<T>where
T: Sync,
impl<T> Unpin for Dft<T>where
T: Unpin,
impl<T> UnwindSafe for Dft<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more