OmniSketch  0.1
Oh my sketch!
MySketch< key_len, T > Class Template Reference
Inheritance diagram for MySketch< key_len, T >:

Public Member Functions

size_t size () const override
 Return the size of the sketch. More...
 
void insert (const OmniSketch::FlowKey< key_len > &flowkey) override
 Insert a flowkey without value. More...
 
void update (const OmniSketch::FlowKey< key_len > &flowkey, T val) override
 Update a flowkey with certain value. More...
 
query (const OmniSketch::FlowKey< key_len > &flowkey) const override
 Query the sketch for the estimated size of a flowkey. More...
 
bool lookup (const OmniSketch::FlowKey< key_len > &flowkey) const override
 Look up a flowkey in the sketch. More...
 
OmniSketch::Data::Estimation< key_len, T > getHeavyHitter (double threshold) const override
 Get all the heavy hitters. More...
 
OmniSketch::Data::Estimation< key_len, T > getHeavyChanger (std::unique_ptr< OmniSketch::Sketch::SketchBase< key_len, T >> &ptr_sketch, double threshold) const override
 Get all the heavy changers. More...
 
OmniSketch::Data::Estimation< key_len, T > decode () override
 Decode all flowkeys along with their values. More...
 

Member Function Documentation

◆ decode()

template<int32_t key_len, typename T >
OmniSketch::Data::Estimation<key_len, T> MySketch< key_len, T >::decode ( )
inlineoverridevirtual

Decode all flowkeys along with their values.

Returns
An Estimation that contains all decoded flowkeys with estimated value. Particularly useful for reversible sketches.

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

◆ getHeavyChanger()

template<int32_t key_len, typename T >
OmniSketch::Data::Estimation<key_len, T> MySketch< key_len, T >::getHeavyChanger ( std::unique_ptr< OmniSketch::Sketch::SketchBase< key_len, T >> &  ptr_sketch,
double  threshold 
) const
inlineoverridevirtual

Get all the heavy changers.

Returns
See Data::Estimation for more info.

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

◆ getHeavyHitter()

template<int32_t key_len, typename T >
OmniSketch::Data::Estimation<key_len, T> MySketch< key_len, T >::getHeavyHitter ( double  threshold) const
inlineoverridevirtual

Get all the heavy hitters.

Returns
See Data::Estimation for more info.

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

◆ insert()

template<int32_t key_len, typename T >
void MySketch< key_len, T >::insert ( const OmniSketch::FlowKey< key_len > &  flowkey)
inlineoverridevirtual

Insert a flowkey without value.

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

◆ lookup()

template<int32_t key_len, typename T >
bool MySketch< key_len, T >::lookup ( const OmniSketch::FlowKey< key_len > &  flowkey) const
inlineoverridevirtual

Look up a flowkey in the sketch.

Returns
true means there exists; false otherwise.

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

◆ query()

template<int32_t key_len, typename T >
T MySketch< key_len, T >::query ( const OmniSketch::FlowKey< key_len > &  flowkey) const
inlineoverridevirtual

Query the sketch for the estimated size of a flowkey.

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

◆ size()

template<int32_t key_len, typename T >
size_t MySketch< key_len, T >::size ( ) const
inlineoverridevirtual

Return the size of the sketch.

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

◆ update()

template<int32_t key_len, typename T >
void MySketch< key_len, T >::update ( const OmniSketch::FlowKey< key_len > &  flowkey,
value 
)
inlineoverridevirtual

Update a flowkey with certain value.

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