mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 07:38:19 +00:00
implement merging for top-k.
I am not (entirely) sure that this is mathematically correct, but I am (more and more) getting the feeling that it... might be. In any case - this was the last step and now it should work in cluster settings.
This commit is contained in:
parent
6f863d2259
commit
2f48008c42
7 changed files with 173 additions and 8 deletions
|
@ -22,3 +22,10 @@ hook observe_hook(r: Reducer, val: double, obs: Observation, rv: ResultVal)
|
|||
}
|
||||
|
||||
|
||||
hook compose_resultvals_hook(result: ResultVal, rv1: ResultVal, rv2: ResultVal)
|
||||
{
|
||||
result$topk = topk_init(500);
|
||||
|
||||
topk_merge(result$topk, rv1$topk);
|
||||
topk_merge(result$topk, rv2$topk);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue