[][src]Trait timescale::InterpolatedDataTable

pub trait InterpolatedDataTable: Send + Sync + 'static {
    type Datapoint: Lerp<Self::Time>;
    type Time: Copy;

    const MIN: Self::Time;
    const MAX: Self::Time;

    fn get_raw(
        time: Self::Time
    ) -> InterpolatedDataPoint<Self::Datapoint, Self::Time>; fn get(time: Self::Time) -> Self::Datapoint { ... } }

Trait to allow for linear interpolation through a static timescale table

Associated Types

type Datapoint: Lerp<Self::Time>

The datapoint type

type Time: Copy

The scalar used for timing, Only f64 or f32 are supported

Loading content...

Associated Constants

const MIN: Self::Time

The minimum time value that is in the dataset

const MAX: Self::Time

The maximum time value that is in the dataset

Loading content...

Required methods

fn get_raw(
    time: Self::Time
) -> InterpolatedDataPoint<Self::Datapoint, Self::Time>

Get a data from the lookup table with all metadata attached. Prefer to use the get method, for this method is an implementation detail

Loading content...

Provided methods

fn get(time: Self::Time) -> Self::Datapoint

Get data from the lookup table, linear interpolating between points if the time given is between 2 points on the table, fully saturating if the time is outside of the table's range

Loading content...

Implementors

Loading content...