Count Min Sketch with CH. More...
#include <CHCMSketch.h>

Public Member Functions | |
| CHCMSketch (int32_t depth, int32_t width, double cnt_no_ratio, const std::vector< size_t > &width_cnt, const std::vector< size_t > &no_hash) | |
| Construct by specifying depth, width and ch parameters. More... | |
| ~CHCMSketch () | |
| Release the pointer. More... | |
| void | update (const FlowKey< key_len > &flowkey, T val) override |
| Update a flowkey with certain value. More... | |
| T | query (const FlowKey< key_len > &flowkey) const override |
| Query a flowkey. More... | |
| size_t | size () const override |
| Get the size of the sketch. More... | |
| void | clear () |
| Reset the sketch. More... | |
Public Member Functions inherited from OmniSketch::Sketch::SketchBase< key_len, T > | |
| virtual void | insert (const FlowKey< key_len > &flowkey) |
| Insert a flowkey without value. More... | |
| virtual bool | lookup (const FlowKey< key_len > &flowkey) const |
| Look up a flowkey in the sketch. More... | |
| virtual Data::Estimation< key_len, T > | getHeavyHitter (double threshold) const |
| Get all the heavy hitters. More... | |
| virtual Data::Estimation< key_len, T > | getHeavyChanger (std::unique_ptr< SketchBase< key_len, T >> &ptr_sketch, double threshold) const |
| Get all the heavy changers. More... | |
| virtual Data::Estimation< key_len, T > | decode () |
| Decode all flowkeys along with their values. More... | |
Count Min Sketch with CH.
| key_len | length of flowkey |
| no_layer | layer of CH |
| T | type of the counter |
| hash_t | hashing class |
| OmniSketch::Sketch::CHCMSketch< key_len, no_layer, T, hash_t >::CHCMSketch | ( | int32_t | depth, |
| int32_t | width, | ||
| double | cnt_no_ratio, | ||
| const std::vector< size_t > & | width_cnt, | ||
| const std::vector< size_t > & | no_hash | ||
| ) |
Construct by specifying depth, width and ch parameters.
| depth | depth of CM |
| width | width of CM |
| cnt_no_width | ratio of the number of counters in two adjacent layers (should be in (0, 1)) |
| width_cnt | Width of counters on each layer |
| no_hash | #hash between adjacent layers |
| OmniSketch::Sketch::CHCMSketch< key_len, no_layer, T, hash_t >::~CHCMSketch |
Release the pointer.
| void OmniSketch::Sketch::CHCMSketch< key_len, no_layer, T, hash_t >::clear |
Reset the sketch.
|
overridevirtual |
Query a flowkey.
Reimplemented from OmniSketch::Sketch::SketchBase< key_len, T >.
|
overridevirtual |
Get the size of the sketch.
Reimplemented from OmniSketch::Sketch::SketchBase< key_len, T >.
|
overridevirtual |
Update a flowkey with certain value.
Reimplemented from OmniSketch::Sketch::SketchBase< key_len, T >.