Class CountMinSketchStateHashes

java.lang.Object
com.espertech.esper.common.internal.epl.approx.countminsketch.CountMinSketchStateHashes

public class CountMinSketchStateHashes extends Object

Count-min sketch (or CM sketch) is a probabilistic sub-linear space streaming algorithm (source: Wikipedia, see http://en.wikipedia.org/wiki/Count%E2%80%93min_sketch)

Count-min sketch computes an approximate frequency and thereby top-k or heavy-hitters.

Paper: Graham Cormode and S. Muthukrishnan. An improved data stream summary: The Count-Min sketch and its applications. 2004. 10.1016/j.jalgor.2003.12.001 http://dl.acm.org/citation.cfm?id=1073718

  • Constructor Details

    • CountMinSketchStateHashes

      public CountMinSketchStateHashes(int depth, int width, long[][] table, long[] hash, long total)
  • Method Details

    • makeState

      public static CountMinSketchStateHashes makeState(CountMinSketchSpecHashes spec)
    • getTable

      public long[][] getTable()
    • getHash

      public long[] getHash()
    • getDepth

      public int getDepth()
    • getWidth

      public int getWidth()
    • incTotal

      public void incTotal(long count)
    • getTotal

      public long getTotal()
    • estimateCount

      public long estimateCount(byte[] item)
    • add

      public void add(byte[] item, long count)