pub struct ComplexToRealEven<T> { /* private fields */ }

Implementations§

source§

impl<T: FftNum> ComplexToRealEven<T>

source

pub fn new(length: usize, fft_planner: &mut FftPlanner<T>) -> Self

Create a new ComplexToRealEven inverse FFT for complex input spectra. The length parameter refers to the length of the resulting real-valued signal. Uses the given FftPlanner to build the inner FFT. Panics if the length is not even.

Trait Implementations§

source§

impl<T: FftNum> ComplexToReal<T> for ComplexToRealEven<T>

source§

fn process( &self, input: &mut [Complex<T>], output: &mut [T] ) -> Result<(), FftError>

Inverse transform a complex spectrum corresponding to a real-valued signal of length N. The input is a slice of complex values with length N/2+1 (with N/2 rounded down). The resulting real-valued signal is stored in the output slice of length N. 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. If the input data is invalid, meaning that one of the positions that should contain a zero holds a non-zero value, the transform is still performed. The function then returns an FftError::InputValues error to tell that the result may not be correct.
source§

fn process_with_scratch( &self, input: &mut [Complex<T>], output: &mut [T], scratch: &mut [Complex<T>] ) -> Result<(), FftError>

Inverse transform a complex spectrum, 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

Get the minimum length of the scratch space needed for process_with_scratch.
source§

fn len(&self) -> usize

The FFT length. Get the length of the real-valued signal that this FFT returns.
source§

fn make_input_vec(&self) -> Vec<Complex<T>>

Convenience method to make an input vector of the right type and length.
source§

fn make_output_vec(&self) -> Vec<T>

Convenience method to make an output vector of the right type and length.
source§

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

Get the length of the slice slice of complex values that this FFT accepts as input.

Auto Trait Implementations§

§

impl<T> !RefUnwindSafe for ComplexToRealEven<T>

§

impl<T> Send for ComplexToRealEven<T>where T: Send,

§

impl<T> Sync for ComplexToRealEven<T>where T: Sync,

§

impl<T> Unpin for ComplexToRealEven<T>where T: Unpin,

§

impl<T> !UnwindSafe for ComplexToRealEven<T>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.