Output of sketch as estimation of ground truth. More...
#include <data.h>

Public Member Functions | |
| GndTruth< key_len, T >::RightConstIterator | begin () const |
| Return a random access iterator pointed to the first element. More... | |
| GndTruth< key_len, T >::RightConstIterator | end () const |
| Return a random access iterator pointed to the very end. More... | |
| bool | insert (const FlowKey< key_len > &flowkey) |
| Insert a flowkey. More... | |
| bool | update (const FlowKey< key_len > &flowkey, T val) |
| Update a flowkey with a value specified. More... | |
| T & | operator[] (const FlowKey< key_len > &flowkey) |
| A more user-friendly interface. More... | |
| size_t | count (const FlowKey< key_len > &flowkey) const |
| Return whether the flowkey exists in this estimate. More... | |
| const T & | at (const FlowKey< key_len > &flowkey) const |
| Get the value of a certain key. More... | |
| size_t | size () const |
| Return the number of flows. More... | |
Output of sketch as estimation of ground truth.
This class provides an interface of bidirectional map similar to a C++ hash table. What's more, right view need not to be a sorted vector, reducing the algorithmic complexity.
| T | type of counter |
| key_len | length of flowkey |
| const T & OmniSketch::Data::Estimation< key_len, T >::at | ( | const FlowKey< key_len > & | flowkey | ) | const |
Get the value of a certain key.
If the key does not exist, an out-of-range exception would be thrown.
|
inline |
Return a random access iterator pointed to the first element.
| size_t OmniSketch::Data::Estimation< key_len, T >::count | ( | const FlowKey< key_len > & | flowkey | ) | const |
Return whether the flowkey exists in this estimate.
Always 0 or 1 in this case
|
inline |
Return a random access iterator pointed to the very end.
| bool OmniSketch::Data::Estimation< key_len, T >::insert | ( | const FlowKey< key_len > & | flowkey | ) |
Insert a flowkey.
Calling this function implies that values are uninterested. If the flowkey does not exists yet, counters are initialized to zero by default.
false if the flowkey has already existed; true otherwise. | T & OmniSketch::Data::Estimation< key_len, T >::operator[] | ( | const FlowKey< key_len > & | flowkey | ) |
A more user-friendly interface.
It serves as a substitute for insert() and update() methods. For methods invocable on a const object, use at() instead.
| size_t OmniSketch::Data::Estimation< key_len, T >::size |
Return the number of flows.
| bool OmniSketch::Data::Estimation< key_len, T >::update | ( | const FlowKey< key_len > & | flowkey, |
| T | val | ||
| ) |
Update a flowkey with a value specified.
If the flowkey does not exists yet, counters are initialized to zero by default.
false if the flowkey has already existed; true otherwise.