Expand description
use median_accumulator::*;

let mut acc = MedianAcc::new();

assert_eq!(acc.get_median(), None);
acc.push(7);
assert_eq!(acc.get_median(), Some(MedianResult::One(7)));
acc.push(5);
assert_eq!(acc.get_median(), Some(MedianResult::Two(5, 7)));
acc.push(7);
assert_eq!(acc.get_median(), Some(MedianResult::One(7)));

In doc comments, N represents the number of samples, D represents the number of different values taken by the samples.

Structs

Accumulator for computing median

Enums

Computed median