ExponentiallyDecayingReservoir class

An exponentially-decaying random reservoir of ints. Uses Cormode et al's forward-decaying priority reservoir sampling method to produce a statistically representative sampling reservoir, exponentially biased towards newer entries.

See Cormode et al. Forward Decay: A Practical Time Decay Model for Streaming Systems. ICDE '09: Proceedings of the 2009 IEEE International Conference on Data Engineering (2009)

Implemented types

Constructors

ExponentiallyDecayingReservoir([int _size = _defaultSize, double _alpha = _defaultAlpha, Clock _clock = const Clock()])
Creates a new ExponentiallyDecayingReservoir.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
size int
The number of values recorded.
no setteroverride
snapshot Snapshot
A snapshot of the reservoir's values.
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
update(int value) → void
Adds a new recorded value to the reservoir.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited