Base sketch. More...
#include <sketch.h>

Public Member Functions | |
| virtual size_t | size () const |
| Return the size of the sketch. More... | |
| virtual void | insert (const FlowKey< key_len > &flowkey) |
| Insert a flowkey without value. More... | |
| virtual void | update (const FlowKey< key_len > &flowkey, T value) |
| Update a flowkey with certain value. More... | |
| virtual T | query (const FlowKey< key_len > &flowkey) const |
| Query the sketch for the estimated size of a flowkey. 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... | |
Base sketch.
This class is provided for the sake of testing. By virtue of polymorphism, testing class is able to call overriden methods in subclasses. Thus, it is suggested that you put override specifier at your overriden method in the derived class (cf. files in sketch/ folder). If the signature mismatches, Test::TestBase may complain by prompting an error.
| T | type of the counter |
| key_len | length of flowkey |
| Functional Description | Partial Signature (Click the links to see more) |
| query sketch size | size() const |
| insert flowkey without value | insert(const FlowKey<key_len> &) |
| insert flowkey with value | update(const FlowKey<key_len> &, T) |
| look up a flowkey (if exists) | lookup(const FlowKey<key_len> &) const |
| heavy hitter | getHeavyHitter(double) const |
| heavy changer | getHeavyChanger(std::unique_ptr<SketchBase<key_len,T>> &, double) const |
| decode flowkeys with values | decode() |
|
inlinevirtual |
Decode all flowkeys along with their values.
Reimplemented in OmniSketch::Sketch::FlowRadar< key_len, T, hash_t >, and MySketch< key_len, T >.
|
inlinevirtual |
Get all the heavy changers.
Reimplemented in MySketch< key_len, T >.
|
inlinevirtual |
Get all the heavy hitters.
Reimplemented in OmniSketch::Sketch::HashPipe< key_len, T, hash_t >, and MySketch< key_len, T >.
|
inlinevirtual |
Insert a flowkey without value.
Reimplemented in MySketch< key_len, T >, OmniSketch::Sketch::BloomFilter< key_len, hash_t >, OmniSketch::Sketch::BloomFilter< key_len, Hash::AwareHash >, and OmniSketch::Sketch::CountingBloomFilter< key_len, hash_t >.
|
inlinevirtual |
Look up a flowkey in the sketch.
true means there exists; false otherwise. Reimplemented in MySketch< key_len, T >, OmniSketch::Sketch::BloomFilter< key_len, hash_t >, OmniSketch::Sketch::BloomFilter< key_len, Hash::AwareHash >, and OmniSketch::Sketch::CountingBloomFilter< key_len, hash_t >.
|
inlinevirtual |
Query the sketch for the estimated size of a flowkey.
Reimplemented in MySketch< key_len, T >, OmniSketch::Sketch::CHCMSketch< key_len, no_layer, T, hash_t >, OmniSketch::Sketch::HashPipe< key_len, T, hash_t >, OmniSketch::Sketch::CUSketch< key_len, T, hash_t >, OmniSketch::Sketch::CMSketch< key_len, T, hash_t >, and OmniSketch::Sketch::CountSketch< key_len, T, hash_t >.
|
inlinevirtual |
Return the size of the sketch.
Reimplemented in OmniSketch::Sketch::FlowRadar< key_len, T, hash_t >, OmniSketch::Sketch::BloomFilter< key_len, Hash::AwareHash >, OmniSketch::Sketch::CHCMSketch< key_len, no_layer, T, hash_t >, OmniSketch::Sketch::HashPipe< key_len, T, hash_t >, OmniSketch::Sketch::CUSketch< key_len, T, hash_t >, OmniSketch::Sketch::CMSketch< key_len, T, hash_t >, OmniSketch::Sketch::CountSketch< key_len, T, hash_t >, and MySketch< key_len, T >.
|
inlinevirtual |
Update a flowkey with certain value.
Reimplemented in MySketch< key_len, T >, OmniSketch::Sketch::FlowRadar< key_len, T, hash_t >, OmniSketch::Sketch::CHCMSketch< key_len, no_layer, T, hash_t >, OmniSketch::Sketch::HashPipe< key_len, T, hash_t >, OmniSketch::Sketch::CUSketch< key_len, T, hash_t >, OmniSketch::Sketch::CMSketch< key_len, T, hash_t >, and OmniSketch::Sketch::CountSketch< key_len, T, hash_t >.