Struct realfft::RealToComplexOdd
source · pub struct RealToComplexOdd<T> { /* private fields */ }
Implementations§
source§impl<T: FftNum> RealToComplexOdd<T>
impl<T: FftNum> RealToComplexOdd<T>
sourcepub fn new(length: usize, fft_planner: &mut FftPlanner<T>) -> Self
pub fn new(length: usize, fft_planner: &mut FftPlanner<T>) -> Self
Create a new RealToComplex forward FFT for real-valued input data of a given length, and uses the given FftPlanner to build the inner FFT. Panics if the length is not odd.
Trait Implementations§
source§impl<T: FftNum> RealToComplex<T> for RealToComplexOdd<T>
impl<T: FftNum> RealToComplex<T> for RealToComplexOdd<T>
source§fn process(
&self,
input: &mut [T],
output: &mut [Complex<T>]
) -> Result<(), FftError>
fn process( &self, input: &mut [T], output: &mut [Complex<T>] ) -> Result<(), FftError>
Transform a signal of N real-valued samples,
storing the resulting complex spectrum in the N/2+1
(with N/2 rounded down) element long output slice.
The input buffer is used as scratch space,
so the contents of input should be considered garbage after calling.
It also allocates additional scratch space as needed.
An error is returned if any of the given slices has the wrong length.
source§fn process_with_scratch(
&self,
input: &mut [T],
output: &mut [Complex<T>],
scratch: &mut [Complex<T>]
) -> Result<(), FftError>
fn process_with_scratch( &self, input: &mut [T], output: &mut [Complex<T>], scratch: &mut [Complex<T>] ) -> Result<(), FftError>
Transform a signal of N real-valued samples,
similar to
process()
.
The difference is that this method uses the provided
scratch buffer instead of allocating new scratch space.
This is faster if the same scratch buffer is used for multiple calls.source§fn get_scratch_len(&self) -> usize
fn get_scratch_len(&self) -> usize
Get the minimum length of the scratch buffer needed for
process_with_scratch
.source§fn len(&self) -> usize
fn len(&self) -> usize
The FFT length.
Get the length of the real signal that this FFT takes as input.
source§fn make_input_vec(&self) -> Vec<T>
fn make_input_vec(&self) -> Vec<T>
Convenience method to make an input vector of the right type and length.
source§fn make_output_vec(&self) -> Vec<Complex<T>>
fn make_output_vec(&self) -> Vec<Complex<T>>
Convenience method to make an output vector of the right type and length.
source§fn make_scratch_vec(&self) -> Vec<Complex<T>>
fn make_scratch_vec(&self) -> Vec<Complex<T>>
Convenience method to make a scratch vector of the right type and length.
source§fn complex_len(&self) -> usize
fn complex_len(&self) -> usize
Get the number of complex data points that this FFT returns.
Auto Trait Implementations§
impl<T> !RefUnwindSafe for RealToComplexOdd<T>
impl<T> Send for RealToComplexOdd<T>
impl<T> Sync for RealToComplexOdd<T>
impl<T> Unpin for RealToComplexOdd<T>
impl<T> !UnwindSafe for RealToComplexOdd<T>
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