Packages

c

akka.remote.artery.compress

CountMinSketch

class CountMinSketch extends AnyRef

INTERNAL API: Count-Min Sketch datastructure.

Not thread-safe.

An Improved Data Stream Summary: The Count-Min Sketch and its Applications https://web.archive.org/web/20060907232042/http://www.eecs.harvard.edu/~michaelm/CS222/countmin.pdf This implementation is mostly taken and adjusted from the Apache V2 licensed project stream-lib, located here: https://github.com/clearspring/stream-lib/blob/master/src/main/java/com/clearspring/analytics/stream/frequency/CountMinSketch.java

Source
CountMinSketch.java
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CountMinSketch
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CountMinSketch(depth: Int, width: Int, seed: Int)

Value Members

  1. def addObjectAndEstimateCount(item: Any, count: Long): Long

    Similar to add, however we reuse the fact that the hask buckets have to be calculated for add already, and a separate estimateCount operation would have to calculate them again, so we do it all in one go.

  2. def confidence(): Double
  3. def estimateCount(item: Any): Long

    The estimate is correct within 'epsilon' * (total item count), with probability confidence.

  4. def relativeError(): Double

    Referred to as epsilon in the whitepaper

  5. def size(): Long
  6. def toString(): String
    Definition Classes
    CountMinSketch → AnyRef → Any