Skip to main content

Kernel

Trait Kernel 

Source
pub trait Kernel<S: Scalar>: Clone {
    // Required method
    fn evaluate(&self, tau: S) -> S;

    // Provided method
    fn as_prony(&self) -> Option<(Vec<S>, Vec<S>)> { ... }
}
Expand description

Trait for memory kernels K(τ) where τ = t - s.

Convolution kernels depend only on the time difference, not absolute time.

Required Methods§

Source

fn evaluate(&self, tau: S) -> S

Evaluate the kernel at time lag τ.

Provided Methods§

Source

fn as_prony(&self) -> Option<(Vec<S>, Vec<S>)>

Check if the kernel is a sum of exponentials (Prony series).

Returns Some((amplitudes, rates)) if the kernel is SOE, None otherwise.

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§