OmniSketch  0.1
Oh my sketch!
OmniSketch::Sketch::FlowRadar< key_len, T, hash_t > Class Template Reference

Flow Radar. More...

#include <FlowRadar.h>

Inheritance diagram for OmniSketch::Sketch::FlowRadar< key_len, T, hash_t >:

Public Member Functions

 FlowRadar (int32_t flow_filter_size, int32_t flow_filter_hash, int32_t count_table_size, int32_t count_table_hash)
 Construct a new Flow Radar object. More...
 
 ~FlowRadar ()
 Destructor. More...
 
void update (const FlowKey< key_len > &flowkey, T val) override
 Update a flowkey with a certain value. More...
 
Data::Estimation< key_len, T > decode () override
 Decode flowkey and its value. More...
 
void clear ()
 Reset the sketch. More...
 
size_t size () const override
 Get the size of 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 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...
 

Detailed Description

template<int32_t key_len, typename T, typename hash_t = Hash::AwareHash>
class OmniSketch::Sketch::FlowRadar< key_len, T, hash_t >

Flow Radar.

Template Parameters
key_lenlength of flowkey
Ttype of the counter
hash_thashing class

Constructor & Destructor Documentation

◆ FlowRadar()

template<int32_t key_len, typename T , typename hash_t >
OmniSketch::Sketch::FlowRadar< key_len, T, hash_t >::FlowRadar ( int32_t  flow_filter_size,
int32_t  flow_filter_hash,
int32_t  count_table_size,
int32_t  count_table_hash 
)

Construct a new Flow Radar object.

Parameters
flow_filter_sizeNumber of bits in flow filter (a Bloom Filter)
flow_filter_hashNumber of hash functions in flow filter
count_table_sizeNumber of elements in count table
count_table_hashNumber of hash functions in count table

◆ ~FlowRadar()

template<int32_t key_len, typename T , typename hash_t >
OmniSketch::Sketch::FlowRadar< key_len, T, hash_t >::~FlowRadar

Destructor.

Member Function Documentation

◆ clear()

template<int32_t key_len, typename T , typename hash_t >
void OmniSketch::Sketch::FlowRadar< key_len, T, hash_t >::clear

Reset the sketch.

◆ decode()

template<int32_t key_len, typename T , typename hash_t >
Data::Estimation< key_len, T > OmniSketch::Sketch::FlowRadar< key_len, T, hash_t >::decode
overridevirtual

Decode flowkey and its value.

Reimplemented from OmniSketch::Sketch::SketchBase< key_len, T >.

◆ size()

template<int32_t key_len, typename T , typename hash_t >
size_t OmniSketch::Sketch::FlowRadar< key_len, T, hash_t >::size
overridevirtual

Get the size of the sketch.

Reimplemented from OmniSketch::Sketch::SketchBase< key_len, T >.

◆ update()

template<int32_t key_len, typename T , typename hash_t >
void OmniSketch::Sketch::FlowRadar< key_len, T, hash_t >::update ( const FlowKey< key_len > &  flowkey,
val 
)
overridevirtual

Update a flowkey with a certain value.

Reimplemented from OmniSketch::Sketch::SketchBase< key_len, T >.