algebird icon indicating copy to clipboard operation
algebird copied to clipboard

Add query methods to CMSSummation

Open johnynek opened this issue 8 years ago • 3 comments

https://github.com/twitter/algebird/blob/develop/algebird-core/src/main/scala/com/twitter/algebird/CountMinSketch.scala#L150

If we had that, we could reuse CMSSummation as a mutable CMS.

johnynek avatar Feb 06 '17 18:02 johnynek

cc @non

johnynek avatar Feb 06 '17 18:02 johnynek

Am I reading this ticket right in that you just want an accessor/mutator for the private vals in CMSSummation? I'm looking for a good introductory ticket and this could be a good one.

jordanrule avatar Aug 10 '22 21:08 jordanrule

see:

https://github.com/twitter/algebird/blob/c18a6b7c86c34e8cc7b3747fc1ea83d42c8b5410/algebird-core/src/main/scala/com/twitter/algebird/CountMinSketch.scala#L425

frequency, innerProduct, totalCount.

The idea is those should also be on the CMSSummation so you don't need to allocate to make queries like that in a mutable context (which is nice to avoid, but not always easy to and retain the highest performance).

johnynek avatar Aug 10 '22 21:08 johnynek