Type Alias linfa_kernel::Kernel

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

Type definition of Kernel that owns its inner matrix

Aliased Type§

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