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§
Required Methods§
Sourcefn forward_slice(
&self,
indata: &[Self::Physical],
outdata: &mut [Self::Spectral],
)
fn forward_slice( &self, indata: &[Self::Physical], outdata: &mut [Self::Spectral], )
§Physical values -> Spectral coefficients
Transforms a one-dimensional slice.
Sourcefn backward_slice(
&self,
indata: &[Self::Spectral],
outdata: &mut [Self::Physical],
)
fn backward_slice( &self, indata: &[Self::Spectral], outdata: &mut [Self::Physical], )
§Spectral coefficients -> Physical values
Transforms a one-dimensional slice.
Provided Methods§
Sourcefn forward<S, D>(
&self,
indata: &ArrayBase<S, D>,
axis: usize,
) -> Array<Self::Spectral, D>
fn forward<S, D>( &self, indata: &ArrayBase<S, D>, axis: usize, ) -> Array<Self::Spectral, D>
§Physical values -> Spectral coefficients
Sourcefn forward_inplace<S1, S2, D>(
&self,
indata: &ArrayBase<S1, D>,
outdata: &mut ArrayBase<S2, D>,
axis: usize,
)
fn forward_inplace<S1, S2, D>( &self, indata: &ArrayBase<S1, D>, outdata: &mut ArrayBase<S2, D>, axis: usize, )
§Physical values -> Spectral coefficients
Sourcefn backward<S, D>(
&self,
indata: &ArrayBase<S, D>,
axis: usize,
) -> Array<Self::Physical, D>
fn backward<S, D>( &self, indata: &ArrayBase<S, D>, axis: usize, ) -> Array<Self::Physical, D>
§Spectral coefficients -> Physical values
Sourcefn backward_inplace<S1, S2, D>(
&self,
indata: &ArrayBase<S1, D>,
outdata: &mut ArrayBase<S2, D>,
axis: usize,
)
fn backward_inplace<S1, S2, D>( &self, indata: &ArrayBase<S1, D>, outdata: &mut ArrayBase<S2, D>, axis: usize, )
§Spectral coefficients -> Physical values
Sourcefn forward_par<S, D>(
&self,
indata: &ArrayBase<S, D>,
axis: usize,
) -> Array<Self::Spectral, D>
fn forward_par<S, D>( &self, indata: &ArrayBase<S, D>, axis: usize, ) -> Array<Self::Spectral, D>
§Physical values -> Spectral coefficients (Parallel)
Sourcefn forward_inplace_par<S1, S2, D>(
&self,
indata: &ArrayBase<S1, D>,
outdata: &mut ArrayBase<S2, D>,
axis: usize,
)
fn forward_inplace_par<S1, S2, D>( &self, indata: &ArrayBase<S1, D>, outdata: &mut ArrayBase<S2, D>, axis: usize, )
§Physical values -> Spectral coefficients (Parallel)
Sourcefn backward_par<S, D>(
&self,
indata: &ArrayBase<S, D>,
axis: usize,
) -> Array<Self::Physical, D>
fn backward_par<S, D>( &self, indata: &ArrayBase<S, D>, axis: usize, ) -> Array<Self::Physical, D>
§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.