pub trait BaseGradient<T>: BaseSize{
// Required method
fn gradient_slice(&self, indata: &[T], outdata: &mut [T], n_times: usize);
// Provided methods
fn gradient<S, D>(
&self,
indata: &ArrayBase<S, D>,
n_times: usize,
axis: usize,
) -> Array<T, D>
where S: Data<Elem = T>,
D: Dimension { ... }
fn gradient_inplace<S1, S2, D>(
&self,
indata: &ArrayBase<S1, D>,
outdata: &mut ArrayBase<S2, D>,
n_times: usize,
axis: usize,
)
where S1: Data<Elem = T>,
S2: Data<Elem = T> + DataMut,
D: Dimension { ... }
fn gradient_par<S, D>(
&self,
indata: &ArrayBase<S, D>,
n_times: usize,
axis: usize,
) -> Array<T, D>
where S: Data<Elem = T>,
D: Dimension,
T: Send + Sync,
Self: Sync { ... }
fn gradient_inplace_par<S1, S2, D>(
&self,
indata: &ArrayBase<S1, D>,
outdata: &mut ArrayBase<S2, D>,
n_times: usize,
axis: usize,
)
where S1: Data<Elem = T>,
S2: Data<Elem = T> + DataMut,
D: Dimension,
T: Send + Sync,
Self: Sync { ... }
}
Expand description
§Gradient
Required Methods§
Sourcefn gradient_slice(&self, indata: &[T], outdata: &mut [T], n_times: usize)
fn gradient_slice(&self, indata: &[T], outdata: &mut [T], n_times: usize)
Differentiate in spectral space
Provided Methods§
Sourcefn gradient<S, D>(
&self,
indata: &ArrayBase<S, D>,
n_times: usize,
axis: usize,
) -> Array<T, D>
fn gradient<S, D>( &self, indata: &ArrayBase<S, D>, n_times: usize, axis: usize, ) -> Array<T, D>
Differentiate in spectral space
Sourcefn gradient_inplace<S1, S2, D>(
&self,
indata: &ArrayBase<S1, D>,
outdata: &mut ArrayBase<S2, D>,
n_times: usize,
axis: usize,
)
fn gradient_inplace<S1, S2, D>( &self, indata: &ArrayBase<S1, D>, outdata: &mut ArrayBase<S2, D>, n_times: usize, axis: usize, )
Differentiate in spectral space
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.