Type Alias Kernel

Source
pub type Kernel<F> = KernelBase<Array2<F>, CsMat<F>>;
Expand description

Type definition of Kernel that owns its inner matrix

Aliased Type§

pub struct Kernel<F> {
    pub inner: KernelInner<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, CsMatBase<F, usize, Vec<usize>, Vec<usize>, Vec<F>>>,
    pub method: KernelMethod<<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>> as Inner>::Elem>,
}

Fields§

§inner: KernelInner<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, CsMatBase<F, usize, Vec<usize>, Vec<usize>, Vec<F>>>§method: KernelMethod<<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>> as Inner>::Elem>

The inner product that will be used by the kernel

Implementations§

Source§

impl<'a, F: Float> Kernel<F>

Source

pub fn new<N: NearestNeighbour>( dataset: ArrayView2<'a, F>, params: &KernelParams<F, N>, ) -> Kernel<F>

Source

pub fn view(&'a self) -> KernelView<'a, F>

Gives a KernelView which has a view on the original kernel’s inner matrix