Add exact name of the Top-k algorithm.

I needed to figure out which exact algorithm we use for our
probabilistic top-k measurements. It turns out that we do not mention
this in our source tree at all so far.
This commit is contained in:
Johanna Amann 2022-05-11 13:21:26 +01:00 committed by Johanna Amann
parent 0aafc8ae6c
commit 25c33d2a29
2 changed files with 10 additions and 2 deletions

View file

@ -1,4 +1,9 @@
##! Keep the top-k (i.e., most frequently occurring) observations. ##! Keep the top-k (i.e., most frequently occurring) observations.
##!
##! This plugin uses a probabilistic algorithm to count the top-k elements.
##! The algorithm (calles Space-Saving) is described in the paper Efficient
##! Computation of Frequent and Top-k Elements in Data Streams", by
##! Metwally et al. (2005).
@load base/frameworks/sumstats @load base/frameworks/sumstats

View file

@ -7,8 +7,11 @@
#include "zeek/OpaqueVal.h" #include "zeek/OpaqueVal.h"
#include "zeek/Val.h" #include "zeek/Val.h"
// This class implements the top-k algorithm. Or - to be more precise - an // This class implements the Space-Saving algorithm for counting the Topk- elements
// interpretation of it. // in a datastream as presented in the paper "Efficient Computation of Frequent and
// Top-k Elements in Data Streams", by Metwally et al. (2005).
//
// Or - to be more precise - it implements an interpretation of it.
namespace zeek::detail namespace zeek::detail
{ {