Expand description
The P-Square (P2) algorithm for dynamic calculation of quantiles without storing observations.
An implementation based on the algorithm described in this paper.
This algorithm calculates estimates for percentiles of observations sets dynamically, with a O(1) space complexity.
§Examples
let mut p2 = P2::new(0.3);
for n in 1..=100 {
p2.feed(n as f64);
}
assert_eq!(p2.estimate(), 30.0);