pub trait LttbSource {
    type Item;

    fn len(&self) -> usize;
    fn item_at(&self, i: usize) -> Self::Item;

    fn is_empty(&self) -> bool { ... }
    fn cast<T, F>(self, f: F) -> Cast<Self, T, F>
    where
        Self: Sized,
        T: DataPoint,
        F: Fn(Self::Item) -> T
, { ... } fn lttb(self, threshold: usize) -> LttbIterator<Self>
    where
        Self: Sized,
        Self::Item: DataPoint
, { ... } }
Expand description

data source for lttb sampling

Known limitations

  • X-values must be in a strictly increasing order

Required Associated Types

data item of LttbSource

Required Methods

length of LttbSource

data item at index i

Provided Methods

is LttbSource empty

map data item to another type.

  • if the data item type of LttbSource is not DataPoint, lttb sampling can be used after casting

lttb sampling

Implementations on Foreign Types

Implementors