pub struct CompressedHistogram { /* private fields */ }
Expand description
Though not fixed, CompressedHistogram
encodes histograms using less space than a StandardHistogram
.
All of the frequencies for each label are approximated by a next greatest exponent.
CompressedHistogram
uses a library HashMap to store the label-frequency pairs, so it is
unbounded in terms of space. It is associated with CompressedParams
There are 2 parameters:
- b -> This floating point number is the base of the approximating exponent.
- max_exp -> This is the number of distinct values that can potentially be stored.
A CompressedHistogram
must be derived from a StandardHistogram
using the to_compressed
function.
Trait Implementations§
Source§impl Histogram<CompressedParams, usize, usize> for CompressedHistogram
impl Histogram<CompressedParams, usize, usize> for CompressedHistogram
Auto Trait Implementations§
impl Freeze for CompressedHistogram
impl RefUnwindSafe for CompressedHistogram
impl Send for CompressedHistogram
impl Sync for CompressedHistogram
impl Unpin for CompressedHistogram
impl UnwindSafe for CompressedHistogram
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more