Trait KernelBuilder

Source
pub trait KernelBuilder<T> {
    type Params;

    // Required method
    fn build<D>(shape: D) -> Result<Array3<T>, Error>
       where D: Copy + IntoDimension<Dim = Ix3>;

    // Provided method
    fn build_with_params<D>(
        shape: D,
        _p: Self::Params,
    ) -> Result<Array3<T>, Error>
       where D: Copy + IntoDimension<Dim = Ix3> { ... }
}
Expand description

Builds a convolutioon kernel given a shape and optional parameters

Required Associated Types§

Source

type Params

Parameters used in construction of the kernel

Required Methods§

Source

fn build<D>(shape: D) -> Result<Array3<T>, Error>
where D: Copy + IntoDimension<Dim = Ix3>,

Build a kernel with a given dimension given sensible defaults for any parameters

Provided Methods§

Source

fn build_with_params<D>(shape: D, _p: Self::Params) -> Result<Array3<T>, Error>
where D: Copy + IntoDimension<Dim = Ix3>,

For kernels with optional parameters use build with params otherwise appropriate default parameters will be chosen

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§