pub struct Radix4<T> { /* private fields */ }
Expand description
FFT algorithm optimized for power-of-two sizes
// Computes a forward FFT of size 4096
use rustfft::algorithm::Radix4;
use rustfft::{Fft, FftDirection};
use rustfft::num_complex::Complex;
let mut buffer = vec![Complex{ re: 0.0f32, im: 0.0f32 }; 4096];
let fft = Radix4::new(4096, FftDirection::Forward);
fft.process(&mut buffer);
Implementations
Trait Implementations
sourceimpl<T> Direction for Radix4<T>
impl<T> Direction for Radix4<T>
sourcefn fft_direction(&self) -> FftDirection
fn fft_direction(&self) -> FftDirection
Returns FftDirection::Forward if this instance computes forward FFTs, or FftDirection::Inverse for inverse FFTs
sourceimpl<T: FftNum> Fft<T> for Radix4<T>
impl<T: FftNum> Fft<T> for Radix4<T>
sourcefn 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 moresourcefn 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>]
)
sourcefn 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 moresourcefn 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> !RefUnwindSafe for Radix4<T>
impl<T> Send for Radix4<T>where
T: Send,
impl<T> Sync for Radix4<T>where
T: Sync,
impl<T> Unpin for Radix4<T>
impl<T> !UnwindSafe for Radix4<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more