Expand description
General trait definitions and StandardHistogram
implementation
Structs§
- Null
Params - These are empty parameters, standard histograms don’t need any extra information.
- Standard
Histogram StandardHistogram
is a naive implementation of a histogram with no optimizations. It has optimal performance since it stores an exact count for exact labels, but it can take an arbitrary amount of space. It uses a library HashMap to store label-frequency pairs, and can be instantiated with one using thecreate_standard_histogram
function.StandardHistogram
is associated with NullParams.
Traits§
- Histogram
- Specifies the behaviors that are necessary to be a histogram. It is generic
and parameterized by
P
, the type of parameters necessary,L
, the type of the labels, andF
, the type that stores the frequency. Both the labels and the frequencies need to be some sort of number. - Histogram
Params - For many of the histogram space optimizations, a set of parameters are needed to
interpret the data in memory as a histogram. These parameters are often needed to create
a more complex kind of histogram, and they always must be passed in the histogram’s
labels
andfrequency
functions.
Functions§
- create_
standard_ histogram - Constructs a
StandardHistogram
from the given HashMap