[][src]Struct c2_histograms::c2::CompressedHistogram

pub struct CompressedHistogram { /* fields omitted */ }

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

impl Histogram<CompressedParams, usize, usize> for CompressedHistogram[src]

fn total(&self) -> usize[src]

returns whichever is greater, the compressed or decompressed size

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.