R2CFftExecutor

Trait R2CFftExecutor 

Source
pub trait R2CFftExecutor<T> {
    // Required methods
    fn execute(
        &self,
        input: &[T],
        output: &mut [Complex<T>],
    ) -> Result<(), ZaftError>;
    fn real_length(&self) -> usize;
    fn complex_length(&self) -> usize;
}

Required Methods§

Source

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

Executes the Real-to-Complex Forward FFT.

The size of the input slice must be equal to self.real_length(), and the size of the output slice must be equal to self.complex_length().

§Parameters
  • input: The real-valued time-domain input array.
  • output: The mutable slice where the complex-valued, Hermitian symmetric frequency data will be written.
§Errors

Returns a ZaftError if the execution fails (e.g., due to incorrect slice lengths or internal computation errors).

Source

fn real_length(&self) -> usize

Returns the length of the real-valued input array (N).

This is the size of the time-domain vector being transformed.

Source

fn complex_length(&self) -> usize

Returns the length of the complex-valued output array (N/2 + 1).

This represents the number of complex elements required to store the meaningful, non-redundant frequency components due to Hermitian symmetry.

Implementors§