Trait hrbf::kernel::Kernel

source ·
pub trait Kernel<T>where
    T: Float,{
    // Required methods
    fn f(&self, x: T) -> T;
    fn df(&self, x: T) -> T;
    fn ddf(&self, x: T) -> T;
    fn dddf(&self, x: T) -> T;
    fn ddddf(&self, x: T) -> T;
    fn df_l(&self, x: T) -> T;
    fn g(&self, x: T) -> T;
    fn g_l(&self, x: T) -> T;
    fn h(&self, x: T, a: T) -> T;
}
Expand description

Kernel trait declaring all of the necessary derivatives.

Required Methods§

source

fn f(&self, x: T) -> T

Main kernel function φ(x)

source

fn df(&self, x: T) -> T

The first derivative φʹ(x)

source

fn ddf(&self, x: T) -> T

The second derivative φʺ(x)

source

fn dddf(&self, x: T) -> T

The third derivative of φ(x)

source

fn ddddf(&self, x: T) -> T

The fourth derivative of φ(x)

source

fn df_l(&self, x: T) -> T

Additional function to ensure proper derivatives at x = 0. equivalent to df(x)/x for x != 0. This function should be well defined at all values of x.

source

fn g(&self, x: T) -> T

Need the following functions for third and fourth HRBF derivaitves

Additional function to ensure proper derivatives at x = 0. equivalent to ddf(x)/x - df(x)/(x*x) for x != 0. This function should go to zero as x goes to zero.

source

fn g_l(&self, x: T) -> T

Additional function to ensure proper derivatives at x = 0. equivalent to ddf(x)/(x*x) - df(x)/(x*x*x) for x != 0. This function should be well defined at all values of x.

source

fn h(&self, x: T, a: T) -> T

Additional function to ensure proper derivatives at x = 0. equivalent to dddf(x)/x - a*(ddf(x)/(x*x) - df(x)/(x*x*x)) for x != 0. This function should go to zero as x goes to zero.

Implementors§

source§

impl<T: Float> Kernel<T> for Csrbf31<T>

source§

impl<T: Float> Kernel<T> for Csrbf42<T>

source§

impl<T: Float> Kernel<T> for Gauss<T>

source§

impl<T: Float> Kernel<T> for Pow2<T>

source§

impl<T: Float> Kernel<T> for Pow3<T>

source§

impl<T: Float> Kernel<T> for Pow4<T>

source§

impl<T: Float> Kernel<T> for Pow5<T>