Struct quantiles::greenwald_khanna::Stream
[−]
[src]
pub struct Stream<T> where
T: Ord, { /* fields omitted */ }
The summary S of the observations seen so far.
Methods
impl<T> Stream<T> where
T: Ord,
[src]
T: Ord,
fn new(epsilon: f64) -> Stream<T>
[src]
Creates a new instance of a Stream
fn insert(&mut self, v: T)
[src]
Locates the correct position in the summary data set for the observation v, and inserts a new tuple (v,1,floor(2en)) If v is the new minimum or maximum, then instead insert tuple (v,1,0).
fn quantile(&self, phi: f64) -> &T
[src]
Compute the epsilon-approximate phi-quantile from the summary data structure.
fn p(&self) -> usize
[src]
Calculate p = 2epsilon * n
fn n(&self) -> usize
[src]
The number of observations inserted into the stream.
fn s(&self) -> usize
[src]
Indication of the space usage of the summary data structure Returns the number of tuples in the summary data structure.
Trait Implementations
impl<T: Debug> Debug for Stream<T> where
T: Ord,
[src]
T: Ord,