Trait Kernel

Source
pub trait Kernel {
    // Required method
    fn kernel(&self, x1: &[f64], x2: &[f64]) -> f64;
}
Expand description

The Kernel trait

Requires a function mapping two vectors to a scalar.

Required Methods§

Source

fn kernel(&self, x1: &[f64], x2: &[f64]) -> f64

The kernel function.

Takes two equal length slices and returns a scalar.

Implementors§

Source§

impl Kernel for Exponential

Source§

impl Kernel for HyperTan

Source§

impl Kernel for Linear

Source§

impl Kernel for Multiquadric

Source§

impl Kernel for Polynomial

Source§

impl Kernel for RationalQuadratic

Source§

impl Kernel for SquaredExp

Source§

impl<T, U> Kernel for KernelProd<T, U>
where T: Kernel, U: Kernel,

Computes the product of the two associated kernels.

Source§

impl<T, U> Kernel for KernelSum<T, U>
where T: Kernel, U: Kernel,

Computes the sum of the two associated kernels.