pub struct StaticDataSeries<T, const N: usize>where
T: DataPoint,{ /* private fields */ }Expand description
A static data series with compile-time capacity bounds
Implementations§
Source§impl<T, const N: usize> StaticDataSeries<T, N>where
T: DataPoint,
impl<T, const N: usize> StaticDataSeries<T, N>where
T: DataPoint,
Sourcepub fn with_label(label: &str) -> Self
pub fn with_label(label: &str) -> Self
Create a new static data series with a label
Sourcepub fn push(&mut self, point: T) -> DataResult<()>
pub fn push(&mut self, point: T) -> DataResult<()>
Add a data point to the series
Sourcepub fn extend<I>(&mut self, points: I) -> DataResult<()>where
I: IntoIterator<Item = T>,
pub fn extend<I>(&mut self, points: I) -> DataResult<()>where
I: IntoIterator<Item = T>,
Add multiple data points from an iterator
Sourcepub fn from_tuples(tuples: &[(T::X, T::Y)]) -> DataResult<Self>where
T: DataPoint,
pub fn from_tuples(tuples: &[(T::X, T::Y)]) -> DataResult<Self>where
T: DataPoint,
Add data points from a slice of tuples
Sourcepub fn remaining_capacity(&self) -> usize
pub fn remaining_capacity(&self) -> usize
Get the remaining capacity
Source§impl<T, const N: usize> StaticDataSeries<T, N>
impl<T, const N: usize> StaticDataSeries<T, N>
Source§impl<T, const N: usize> StaticDataSeries<T, N>
impl<T, const N: usize> StaticDataSeries<T, N>
Sourcepub fn bounds(&self) -> DataResult<DataBounds<T::X, T::Y>>
pub fn bounds(&self) -> DataResult<DataBounds<T::X, T::Y>>
Get the bounds of this data series
Trait Implementations§
Source§impl<T, const N: usize> Clone for StaticDataSeries<T, N>
impl<T, const N: usize> Clone for StaticDataSeries<T, N>
Source§fn clone(&self) -> StaticDataSeries<T, N>
fn clone(&self) -> StaticDataSeries<T, N>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T, const M: usize> DataAggregation for StaticDataSeries<T, M>
Implementation of aggregation for StaticDataSeries
impl<T, const M: usize> DataAggregation for StaticDataSeries<T, M>
Implementation of aggregation for StaticDataSeries
Source§fn aggregate<const N: usize>(
&self,
config: &AggregationConfig,
) -> DataResult<StaticDataSeries<T, N>>
fn aggregate<const N: usize>( &self, config: &AggregationConfig, ) -> DataResult<StaticDataSeries<T, N>>
Aggregate data points using the specified strategy Read more
Source§fn downsample_lttb<const N: usize>(
&self,
config: &DownsamplingConfig,
) -> DataResult<StaticDataSeries<T, N>>
fn downsample_lttb<const N: usize>( &self, config: &DownsamplingConfig, ) -> DataResult<StaticDataSeries<T, N>>
Downsample data using Largest Triangle Three Buckets algorithm Read more
Source§fn downsample_uniform<const N: usize>(
&self,
config: &DownsamplingConfig,
) -> DataResult<StaticDataSeries<T, N>>
fn downsample_uniform<const N: usize>( &self, config: &DownsamplingConfig, ) -> DataResult<StaticDataSeries<T, N>>
Downsample data using uniform sampling (every Nth point) Read more
Source§fn calculate_group_stats(&self, points: &[T]) -> DataResult<GroupStats<T>>
fn calculate_group_stats(&self, points: &[T]) -> DataResult<GroupStats<T>>
Calculate statistics for a group of data points Read more
Source§impl<T, const N: usize> DataSeries for StaticDataSeries<T, N>
impl<T, const N: usize> DataSeries for StaticDataSeries<T, N>
Source§type Iter = StaticDataSeriesIter<T, N>
type Iter = StaticDataSeriesIter<T, N>
Iterator type for iterating over data points (cloning)
Source§fn calculate_bounds(&self) -> DataResult<()>
fn calculate_bounds(&self) -> DataResult<()>
Calculate the bounds of this data series
Source§impl<T, const N: usize> Debug for StaticDataSeries<T, N>
impl<T, const N: usize> Debug for StaticDataSeries<T, N>
Source§impl Interpolatable for StaticDataSeries<Point2D, 256>
impl Interpolatable for StaticDataSeries<Point2D, 256>
Source§fn interpolate(self, other: Self, progress: f32) -> Option<Self>
fn interpolate(self, other: Self, progress: f32) -> Option<Self>
Interpolate between two values with the given progress (0.0 to 1.0).
Auto Trait Implementations§
impl<T, const N: usize> Freeze for StaticDataSeries<T, N>where
T: Freeze,
impl<T, const N: usize> RefUnwindSafe for StaticDataSeries<T, N>where
T: RefUnwindSafe,
impl<T, const N: usize> Send for StaticDataSeries<T, N>where
T: Send,
impl<T, const N: usize> Sync for StaticDataSeries<T, N>where
T: Sync,
impl<T, const N: usize> Unpin for StaticDataSeries<T, N>where
T: Unpin,
impl<T, const N: usize> UnwindSafe for StaticDataSeries<T, N>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
Casts the value.
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> OverflowingAs for T
impl<T> OverflowingAs for T
Source§fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
fn overflowing_as<Dst>(self) -> (Dst, bool)where
T: OverflowingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
impl<Src, Dst> OverflowingCastFrom<Src> for Dstwhere
Src: OverflowingCast<Dst>,
Source§fn overflowing_cast_from(src: Src) -> (Dst, bool)
fn overflowing_cast_from(src: Src) -> (Dst, bool)
Casts the value.
Source§impl<T> SaturatingAs for T
impl<T> SaturatingAs for T
Source§fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
fn saturating_as<Dst>(self) -> Dstwhere
T: SaturatingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
impl<Src, Dst> SaturatingCastFrom<Src> for Dstwhere
Src: SaturatingCast<Dst>,
Source§fn saturating_cast_from(src: Src) -> Dst
fn saturating_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> UnwrappedAs for T
impl<T> UnwrappedAs for T
Source§fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
fn unwrapped_as<Dst>(self) -> Dstwhere
T: UnwrappedCast<Dst>,
Casts the value.
Source§impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
impl<Src, Dst> UnwrappedCastFrom<Src> for Dstwhere
Src: UnwrappedCast<Dst>,
Source§fn unwrapped_cast_from(src: Src) -> Dst
fn unwrapped_cast_from(src: Src) -> Dst
Casts the value.
Source§impl<T> WrappingAs for T
impl<T> WrappingAs for T
Source§fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
fn wrapping_as<Dst>(self) -> Dstwhere
T: WrappingCast<Dst>,
Casts the value.
Source§impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
impl<Src, Dst> WrappingCastFrom<Src> for Dstwhere
Src: WrappingCast<Dst>,
Source§fn wrapping_cast_from(src: Src) -> Dst
fn wrapping_cast_from(src: Src) -> Dst
Casts the value.