FftProcessor

Trait FftProcessor 

Source
pub trait FftProcessor<T: FftNum, InElem: GetProcessor<T, InElem>> {
    // Required methods
    fn forward<S: DataMut<Elem = InElem>, const N: usize>(
        &mut self,
        input: &mut ArrayBase<S, Dim<[Ix; N]>>,
    ) -> Array<Complex<T>, Dim<[Ix; N]>>
       where Dim<[Ix; N]>: RemoveAxis,
             [Ix; N]: IntoDimension<Dim = Dim<[Ix; N]>>;
    fn backward<const N: usize>(
        &mut self,
        input: &mut Array<Complex<T>, Dim<[Ix; N]>>,
    ) -> Array<InElem, Dim<[Ix; N]>>
       where Dim<[Ix; N]>: RemoveAxis,
             [Ix; N]: IntoDimension<Dim = Dim<[Ix; N]>>;
}
Expand description

Trait for FFT processors that can perform forward and backward transforms.

This trait defines the interface for performing FFT operations on N-dimensional arrays. Implementations exist for both real-valued and complex-valued inputs.

Required Methods§

Source

fn forward<S: DataMut<Elem = InElem>, const N: usize>( &mut self, input: &mut ArrayBase<S, Dim<[Ix; N]>>, ) -> Array<Complex<T>, Dim<[Ix; N]>>
where Dim<[Ix; N]>: RemoveAxis, [Ix; N]: IntoDimension<Dim = Dim<[Ix; N]>>,

Performs a forward FFT transform.

Converts the input array from the spatial/time domain to the frequency domain.

§Arguments
  • input: A mutable reference to the input array
§Returns

An array of complex values representing the frequency domain.

Source

fn backward<const N: usize>( &mut self, input: &mut Array<Complex<T>, Dim<[Ix; N]>>, ) -> Array<InElem, Dim<[Ix; N]>>
where Dim<[Ix; N]>: RemoveAxis, [Ix; N]: IntoDimension<Dim = Dim<[Ix; N]>>,

Performs a backward (inverse) FFT transform.

Converts the input array from the frequency domain back to the spatial/time domain.

§Arguments
  • input: A mutable reference to the frequency domain array
§Returns

An array in the spatial/time domain with the same element type as the original input.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§