com.espertech.esper.epl.approx
Class CountMinSketchStateHashes
java.lang.Object
com.espertech.esper.epl.approx.CountMinSketchStateHashes
public class CountMinSketchStateHashes
- extends java.lang.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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CountMinSketchStateHashes
public CountMinSketchStateHashes(int depth,
int width,
long[][] table,
long[] hash,
long total)
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)