[][src]Module c2_histograms::c2

Space saving histogram implementations

Structs

C2Params

C2Params are a wrapper struct for a set of CompactParams and CompressedParams.

C2Histogram

C2Histogram is a combination of CompressedHistogram and CompactHistogram, performing the memory saving operations from each of them. It is associated with C2Params.

CompactHistogram

CompactHistogram is a fixed-size representation of a histogram. The set of possible labels are partitioned into logarithmically scaled ranges, then further subdivided into equally sized sub-ranges (equally sized within a given range). A CompactHistogram stores a counter for each of the larger logarithmic ranges and which of the equally sized sub-ranges contains the frequency-weighted average of the labels. It is associated with CompactParams.

CompactParams

CompactParams contains 3 critical parameters determining how a CompactHistogram is stored and interpreted. See CompactHistogram for a full explanation.

CompressedHistogram

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

CompressedParams

CompactParams contains 2 parameters determining how a CompressedHistogram is stored and interpreted. See CompressedHistogram for a full explanation.

Functions

new_c2_params

Wraps CompactParams and CompressedParams.

new_compact_params

ensures that the parameters are all valid and if so creates a new CompactParams struct

new_compressed_params

checks parameters for validity and if so creates a new CompressedParams struct