Skip to main content

C2rPlan

Trait C2rPlan 

Source
pub trait C2rPlan {
    // Required methods
    fn n_fft(&self) -> usize;
    fn input_len(&self) -> usize;
    fn process(
        &mut self,
        input: &[Complex<f64>],
        output: &mut [f64],
    ) -> 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<f64>], output: &mut [f64], ) -> 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.

Implementors§