FftExecutor

Trait FftExecutor 

Source
pub trait FftExecutor<T> {
    // Required methods
    fn execute(&self, in_place: &mut [Complex<T>]) -> Result<(), ZaftError>;
    fn direction(&self) -> FftDirection;
    fn length(&self) -> usize;
}

Required Methods§

Source

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

Executes the Complex-to-Complex FFT operation in-place.

The input/output slice in_place must have a length equal to self.length(). The direction of the transform (Forward or Inverse) is determined by the executor’s pre-configured state, accessible via self.direction().

§Parameters
  • in_place: The mutable slice containing the complex-valued input data. Upon completion, it will contain the complex-valued frequency-domain result (for a Forward transform) or the time-domain result (for an Inverse transform).
§Errors

Returns a ZaftError if the execution fails (e.g., due to an incorrect slice length).

Source

fn direction(&self) -> FftDirection

Returns the direction of the transform this executor is configured to perform.

The direction is typically either FftDirection::Forward (Time to Frequency) or FftDirection::Inverse (Frequency to Time).

Source

fn length(&self) -> usize

Returns the length (size N) of the input and output complex vectors.

This is the number of complex elements that the executor is designed to process.

Implementors§