Extrapolator

Trait Extrapolator 

Source
pub trait Extrapolator: Send + Sync {
    // Required methods
    fn extrapolate(
        &self,
        t: f64,
        last_t: f64,
        last_value: f64,
        last_derivative: f64,
    ) -> f64;
    fn name(&self) -> &'static str;
}
Expand description

Trait for extrapolation methods.

Extrapolators extend curves beyond their last observed point.

Required Methods§

Source

fn extrapolate( &self, t: f64, last_t: f64, last_value: f64, last_derivative: f64, ) -> f64

Extrapolates to time t given the last known point.

§Arguments
  • t - Target time for extrapolation
  • last_t - Time of last known point
  • last_value - Value at last known point
  • last_derivative - Derivative at last known point (slope)
Source

fn name(&self) -> &'static str

Returns the name of the extrapolation method.

Implementors§