CountMinSketch
Public Methods
CountMinSketch
inline
Parameters
-
epsError parameter (epsilon). Error <= eps * N with probability delta Smaller eps = more memory, more accuracy -
deltaConfidence parameter. Error guarantee holds with probability (1 - delta) Smaller delta = more memory, higher confidence
Exceptions
-
std::invalid_argumentIf eps <= 0 or eps >= 1 -
std::invalid_argumentIf delta <= 0 or delta >= 1
Example:
increment
inline
Parameters
-
keyString identifier to count -
countAmount to add (default: 1)
estimate
const
Parameters
keyKey to estimate count for
Returns
Estimated count (guaranteed >= true count)Parameters
-
>=Actual frequency (upper bound) -
<=eps * N (theoretical upper bound)
clear
inline
Private Attributes
table_
w_
d_
Private Methods
hash_fn
const