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]
fn new(epsilon: f64) -> Stream<T>
Creates a new instance of a Stream
fn insert(&mut self, v: T)
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
Compute the epsilon-approximate phi-quantile from the summary data structure.
fn p(&self) -> usize
Calculate p = 2epsilon * n
fn n(&self) -> usize
The number of observations inserted into the stream.
fn s(&self) -> usize
Indication of the space usage of the summary data structure Returns the number of tuples in the summary data structure.