Trait BaseTransform

Source
pub trait BaseTransform: BaseSize {
    type Physical;
    type Spectral;

    // Required methods
    fn forward_slice(
        &self,
        indata: &[Self::Physical],
        outdata: &mut [Self::Spectral],
    );
    fn backward_slice(
        &self,
        indata: &[Self::Spectral],
        outdata: &mut [Self::Physical],
    );

    // Provided methods
    fn forward<S, D>(
        &self,
        indata: &ArrayBase<S, D>,
        axis: usize,
    ) -> Array<Self::Spectral, D>
       where S: Data<Elem = Self::Physical>,
             D: Dimension,
             Self::Physical: Clone,
             Self::Spectral: Zero + Clone + Copy { ... }
    fn forward_inplace<S1, S2, D>(
        &self,
        indata: &ArrayBase<S1, D>,
        outdata: &mut ArrayBase<S2, D>,
        axis: usize,
    )
       where S1: Data<Elem = Self::Physical>,
             S2: Data<Elem = Self::Spectral> + DataMut,
             D: Dimension,
             Self::Physical: Clone,
             Self::Spectral: Clone + Zero + Copy { ... }
    fn backward<S, D>(
        &self,
        indata: &ArrayBase<S, D>,
        axis: usize,
    ) -> Array<Self::Physical, D>
       where S: Data<Elem = Self::Spectral>,
             D: Dimension,
             Self::Spectral: Clone,
             Self::Physical: Zero + Clone + Copy { ... }
    fn backward_inplace<S1, S2, D>(
        &self,
        indata: &ArrayBase<S1, D>,
        outdata: &mut ArrayBase<S2, D>,
        axis: usize,
    )
       where S1: Data<Elem = Self::Spectral>,
             S2: Data<Elem = Self::Physical> + DataMut,
             D: Dimension,
             Self::Spectral: Clone,
             Self::Physical: Clone + Zero + Copy { ... }
    fn forward_par<S, D>(
        &self,
        indata: &ArrayBase<S, D>,
        axis: usize,
    ) -> Array<Self::Spectral, D>
       where S: Data<Elem = Self::Physical>,
             D: Dimension,
             Self::Physical: Clone + Send + Sync,
             Self::Spectral: Zero + Clone + Copy + Send + Sync,
             Self: Sync { ... }
    fn forward_inplace_par<S1, S2, D>(
        &self,
        indata: &ArrayBase<S1, D>,
        outdata: &mut ArrayBase<S2, D>,
        axis: usize,
    )
       where S1: Data<Elem = Self::Physical>,
             S2: Data<Elem = Self::Spectral> + DataMut,
             D: Dimension,
             Self::Physical: Clone + Send + Sync,
             Self::Spectral: Clone + Zero + Copy + Send + Sync,
             Self: Sync { ... }
    fn backward_par<S, D>(
        &self,
        indata: &ArrayBase<S, D>,
        axis: usize,
    ) -> Array<Self::Physical, D>
       where S: Data<Elem = Self::Spectral>,
             D: Dimension,
             Self::Spectral: Clone + Send + Sync,
             Self::Physical: Zero + Clone + Copy + Send + Sync,
             Self: Sync { ... }
    fn backward_inplace_par<S1, S2, D>(
        &self,
        indata: &ArrayBase<S1, D>,
        outdata: &mut ArrayBase<S2, D>,
        axis: usize,
    )
       where S1: Data<Elem = Self::Spectral>,
             S2: Data<Elem = Self::Physical> + DataMut,
             D: Dimension,
             Self::Spectral: Clone + Send + Sync,
             Self::Physical: Clone + Zero + Copy + Send + Sync,
             Self: Sync { ... }
}
Expand description

The associated types Physical and Spectral refer to the scalar types in the physical and spectral space. For example, Fourier transforms from real-to-complex, while Chebyshev transforms from real-to-real.

Required Associated Types§

Source

type Physical

§Scalar type in physical space
Source

type Spectral

§Scalar type in spectral space

Required Methods§

Source

fn forward_slice( &self, indata: &[Self::Physical], outdata: &mut [Self::Spectral], )

§Physical values -> Spectral coefficients

Transforms a one-dimensional slice.

Source

fn backward_slice( &self, indata: &[Self::Spectral], outdata: &mut [Self::Physical], )

§Spectral coefficients -> Physical values

Transforms a one-dimensional slice.

Provided Methods§

Source

fn forward<S, D>( &self, indata: &ArrayBase<S, D>, axis: usize, ) -> Array<Self::Spectral, D>
where S: Data<Elem = Self::Physical>, D: Dimension, Self::Physical: Clone, Self::Spectral: Zero + Clone + Copy,

§Physical values -> Spectral coefficients
Source

fn forward_inplace<S1, S2, D>( &self, indata: &ArrayBase<S1, D>, outdata: &mut ArrayBase<S2, D>, axis: usize, )
where S1: Data<Elem = Self::Physical>, S2: Data<Elem = Self::Spectral> + DataMut, D: Dimension, Self::Physical: Clone, Self::Spectral: Clone + Zero + Copy,

§Physical values -> Spectral coefficients
Source

fn backward<S, D>( &self, indata: &ArrayBase<S, D>, axis: usize, ) -> Array<Self::Physical, D>
where S: Data<Elem = Self::Spectral>, D: Dimension, Self::Spectral: Clone, Self::Physical: Zero + Clone + Copy,

§Spectral coefficients -> Physical values
Source

fn backward_inplace<S1, S2, D>( &self, indata: &ArrayBase<S1, D>, outdata: &mut ArrayBase<S2, D>, axis: usize, )
where S1: Data<Elem = Self::Spectral>, S2: Data<Elem = Self::Physical> + DataMut, D: Dimension, Self::Spectral: Clone, Self::Physical: Clone + Zero + Copy,

§Spectral coefficients -> Physical values
Source

fn forward_par<S, D>( &self, indata: &ArrayBase<S, D>, axis: usize, ) -> Array<Self::Spectral, D>
where S: Data<Elem = Self::Physical>, D: Dimension, Self::Physical: Clone + Send + Sync, Self::Spectral: Zero + Clone + Copy + Send + Sync, Self: Sync,

§Physical values -> Spectral coefficients (Parallel)
Source

fn forward_inplace_par<S1, S2, D>( &self, indata: &ArrayBase<S1, D>, outdata: &mut ArrayBase<S2, D>, axis: usize, )
where S1: Data<Elem = Self::Physical>, S2: Data<Elem = Self::Spectral> + DataMut, D: Dimension, Self::Physical: Clone + Send + Sync, Self::Spectral: Clone + Zero + Copy + Send + Sync, Self: Sync,

§Physical values -> Spectral coefficients (Parallel)
Source

fn backward_par<S, D>( &self, indata: &ArrayBase<S, D>, axis: usize, ) -> Array<Self::Physical, D>
where S: Data<Elem = Self::Spectral>, D: Dimension, Self::Spectral: Clone + Send + Sync, Self::Physical: Zero + Clone + Copy + Send + Sync, Self: Sync,

§Spectral coefficients -> Physical values (Parallel)
Source

fn backward_inplace_par<S1, S2, D>( &self, indata: &ArrayBase<S1, D>, outdata: &mut ArrayBase<S2, D>, axis: usize, )
where S1: Data<Elem = Self::Spectral>, S2: Data<Elem = Self::Physical> + DataMut, D: Dimension, Self::Spectral: Clone + Send + Sync, Self::Physical: Clone + Zero + Copy + Send + Sync, Self: Sync,

§Spectral coefficients -> Physical values (Parallel)

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§