pub struct TimeMatrix<F, P>where
F: SerialStatistic<P>,
P: InterpolationKind,{ /* private fields */ }
Expand description
One or more statistical round-robin time series.
A time matrix is a round-robin multi-resolution time series that samples and interpolates timed data, computes statistical aggregations for elapsed sampling intervals, and buffers those aggregations. The sample data, statistic, and interpolation of series in a time matrix must be the same, but the sampling intervals can and should differ.
Implementations§
Source§impl<F, P> TimeMatrix<F, P>where
F: SerialStatistic<P>,
P: InterpolationKind,
impl<F, P> TimeMatrix<F, P>where
F: SerialStatistic<P>,
P: InterpolationKind,
Sourcepub fn new(
profile: impl Into<SamplingProfile>,
interpolation: P::Output<F::Sample>,
) -> Selfwhere
F: Default,
pub fn new(
profile: impl Into<SamplingProfile>,
interpolation: P::Output<F::Sample>,
) -> Selfwhere
F: Default,
Constructs a time matrix with the given sampling profile and interpolation.
Statistics are default initialized.
Sourcepub fn with_statistic(
profile: impl Into<SamplingProfile>,
interpolation: P::Output<F::Sample>,
statistic: F,
) -> Self
pub fn with_statistic( profile: impl Into<SamplingProfile>, interpolation: P::Output<F::Sample>, statistic: F, ) -> Self
Constructs a time matrix with the given statistic.
Sourcepub fn fold_and_get_buffers(
&mut self,
sample: Timed<F::Sample>,
) -> Result<SerializedBuffer, FoldError>
pub fn fold_and_get_buffers( &mut self, sample: Timed<F::Sample>, ) -> Result<SerializedBuffer, FoldError>
Folds the given sample and interpolations and gets the aggregation buffers.
To fold a sample without serializing buffers, use Sampler::fold
.
Source§impl<F, R, P, A> TimeMatrix<PostAggregation<F, R>, P>where
PostAggregation<F, R>: SerialStatistic<P, Aggregation = A>,
F: Default + SerialStatistic<P>,
R: Clone + Fn(F::Aggregation) -> A,
P: InterpolationKind,
A: Clone,
impl<F, R, P, A> TimeMatrix<PostAggregation<F, R>, P>where
PostAggregation<F, R>: SerialStatistic<P, Aggregation = A>,
F: Default + SerialStatistic<P>,
R: Clone + Fn(F::Aggregation) -> A,
P: InterpolationKind,
A: Clone,
Sourcepub fn with_transform(
profile: impl Into<SamplingProfile>,
interpolation: P::Output<<PostAggregation<F, R> as Statistic>::Sample>,
transform: R,
) -> Selfwhere
R: Clone,
pub fn with_transform(
profile: impl Into<SamplingProfile>,
interpolation: P::Output<<PostAggregation<F, R> as Statistic>::Sample>,
transform: R,
) -> Selfwhere
R: Clone,
Constructs a time matrix with the default statistic and given transform for post-aggregation.
Trait Implementations§
Source§impl<F, P> Clone for TimeMatrix<F, P>where
F: SerialStatistic<P> + Clone,
P: InterpolationKind,
F::Buffer: Clone,
P::Output<F::Sample>: Clone,
impl<F, P> Clone for TimeMatrix<F, P>where
F: SerialStatistic<P> + Clone,
P: InterpolationKind,
F::Buffer: Clone,
P::Output<F::Sample>: Clone,
Source§impl<F, P> Debug for TimeMatrix<F, P>where
F: SerialStatistic<P> + Debug,
P: InterpolationKind,
F::Buffer: Debug,
P::Output<F::Sample>: Debug,
impl<F, P> Debug for TimeMatrix<F, P>where
F: SerialStatistic<P> + Debug,
P: InterpolationKind,
F::Buffer: Debug,
P::Output<F::Sample>: Debug,
Source§impl<F, P> Default for TimeMatrix<F, P>
impl<F, P> Default for TimeMatrix<F, P>
Source§impl<F, P> Interpolator for TimeMatrix<F, P>where
F: SerialStatistic<P>,
P: InterpolationKind,
impl<F, P> Interpolator for TimeMatrix<F, P>where
F: SerialStatistic<P>,
P: InterpolationKind,
Source§fn interpolate(&mut self, timestamp: Timestamp) -> Result<(), FoldError>
fn interpolate(&mut self, timestamp: Timestamp) -> Result<(), FoldError>
Source§fn interpolate_and_get_buffers(
&mut self,
timestamp: Timestamp,
) -> Result<SerializedBuffer, FoldError>
fn interpolate_and_get_buffers( &mut self, timestamp: Timestamp, ) -> Result<SerializedBuffer, FoldError>
Source§impl<F, P> MatrixSampler<<F as Statistic>::Sample> for TimeMatrix<F, P>where
F: SerialStatistic<P>,
P: InterpolationKind,
impl<F, P> MatrixSampler<<F as Statistic>::Sample> for TimeMatrix<F, P>where
F: SerialStatistic<P>,
P: InterpolationKind,
Auto Trait Implementations§
impl<F, P> Freeze for TimeMatrix<F, P>
impl<F, P> RefUnwindSafe for TimeMatrix<F, P>where
<F as SerialStatistic<P>>::Buffer: RefUnwindSafe,
<P as InterpolationKind>::Output<<F as Statistic>::Sample>: RefUnwindSafe,
F: RefUnwindSafe,
impl<F, P> Send for TimeMatrix<F, P>where
<F as SerialStatistic<P>>::Buffer: Send,
<P as InterpolationKind>::Output<<F as Statistic>::Sample>: Send,
F: Send,
impl<F, P> Sync for TimeMatrix<F, P>where
<F as SerialStatistic<P>>::Buffer: Sync,
<P as InterpolationKind>::Output<<F as Statistic>::Sample>: Sync,
F: Sync,
impl<F, P> Unpin for TimeMatrix<F, P>where
<F as SerialStatistic<P>>::Buffer: Unpin,
<P as InterpolationKind>::Output<<F as Statistic>::Sample>: Unpin,
F: Unpin,
impl<F, P> UnwindSafe for TimeMatrix<F, P>where
<F as SerialStatistic<P>>::Buffer: UnwindSafe,
<P as InterpolationKind>::Output<<F as Statistic>::Sample>: UnwindSafe,
F: 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more