Skip to main content

C2rPlan

Trait C2rPlan 

Source
pub trait C2rPlan<T = f64> {
    // Required methods
    fn n_fft(&self) -> usize;
    fn input_len(&self) -> usize;
    fn process(
        &mut self,
        input: &[Complex<T>],
        output: &mut [T],
    ) -> SpectrogramResult<()>;
}
Expand description

A planned complex-to-real inverse FFT for a fixed transform length.

Required Methods§

Source

fn n_fft(&self) -> usize

FFT size

§Returns

Length of the FFT.

Source

fn input_len(&self) -> usize

Input length for complex-to-real inverse FFT is r2c_output_size(n_fft)

§Returns

Length of the complex input slice required for the inverse FFT.

Source

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

Process complex input to real output.

§Arguments
  • input - Complex frequency domain input
  • output - Real time domain output
§Returns

Ok(()) if successful, or SpectrogramError if dimensions are invalid.

§Errors

Returns SpectrogramError::dimension_mismatch if input or output lengths do not match expected sizes.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§