package window
- Alphabetic
- Public
- All
Type Members
- trait Aggregator[T, A] extends AnyRef
Tooling and state wrapper to efficiently compute aggregates over sliding windows, in contexts where this is possible.
Tooling and state wrapper to efficiently compute aggregates over sliding windows, in contexts where this is possible. Instead of aggregating huge slices of a time series, this class iteratively calculates the aggregated value when an entry is added. This allows to only store the summed value instead of all the entries in the case of addition, for example.
The aggregator will be applied sequentially, so it may keep track of any state from one entry the next.
- T
the type of the entries being aggregated over
- A
the type of the aggregated value
- class IntegralAggregator[T] extends TimeAwareReversibleAggregator[T, Double]
An aggregator that relies on the passed entries' integral function.
An aggregator that relies on the passed entries' integral function.
Very similar to the SummingAggregator, but takes the validity of each entry into account. It is therefore time-aware and needs entries to be contained in the window.
- class MeanAggregator[T] extends TimeAwareReversibleAggregator[T, Double]
Reversible aggregator that calculates the mean of the values in the window weighted by time of validity.
Reversible aggregator that calculates the mean of the values in the window weighted by time of validity. It is therefore time-aware and needs entries to be contained in the window.
- class MinAggregator[T] extends TimeUnawareReversibleAggregator[T, T]
A reversible aggregator that keeps track of the minimum of the values present in the window.
A reversible aggregator that keeps track of the minimum of the values present in the window. You can get a maximum aggregator by simply reversing the ordering passed as an implicit.
The aggregator uses an ordered internal queue and discards values that can never be the minimum.
- abstract class QueueAggregator[T, A] extends TimeUnawareReversibleAggregator[T, A]
Template aggregator that keeps track of the entire window.
Template aggregator that keeps track of the entire window. It is therefore not efficient for most calculations.
- sealed trait ReversibleAggregator[T, A] extends Aggregator[T, A]
Extension to the Aggregator that also supports removing entries from the aggregated value.
Extension to the Aggregator that also supports removing entries from the aggregated value. Assuming we want to aggregate the content of a window, and to do so for each different window returned by WindowSlider, many iterations will be required.
Depending on the aggregation function, this is however not required: For simple cases like addition or multiplication and any situation where the contributions of a single entry to the aggregated value may be reversed, we can compute an aggregated value for each window in linear time.
The reversible aggregator will be applied sequentially, so it may keep track of any state from one addition or removal to the next.
Some aggregations depend on the duration of the entries like integration or averaging, others like min max don't. To keep those types of aggregations well separated, implementations need to extend either the time-aware or the time-unaware subtrait. This allows us to use different windowing functions for the two types.
- T
the type of the entries being aggregated over
- A
the type of the aggregated value
- class StdAggregator[T] extends TimeAwareReversibleAggregator[T, Double]
Reversible aggregator that calculates the (biased) standard deviation (e.g.
Reversible aggregator that calculates the (biased) standard deviation (e.g. square root of the variance) of the values in the window, weighted by time of validity. It is therefore time-aware and needs entries to be contained in the window.
- class SumAggregator[T] extends TimeUnawareReversibleAggregator[T, T]
A reversible aggregator that keeps track of the total sum of the values present in each entry that is at least partially within the window's domain.
A reversible aggregator that keeps track of the total sum of the values present in each entry that is at least partially within the window's domain.
Discontinuities in the domain of definition between entries are completely ignored.
- trait TimeAwareReversibleAggregator[T, A] extends ReversibleAggregator[T, A]
This trait should be extended by all aggregators that depend on the time/duration in their calculation like integration, averaging over time etc.
- trait TimeUnawareReversibleAggregator[T, A] extends ReversibleAggregator[T, A]
This trait should be extended by all aggregators that don't depend on the duration in their calculation like min, max, median.
Value Members
- object Aggregator
- object DoNothingAggregator extends TimeUnawareReversibleAggregator[Nothing, Nothing]
An aggregator that does strictly nothing.
An aggregator that does strictly nothing. Used for window creation without aggregation.
- object WindowSlider