Skip to content

Commit 66f1333

Browse files
Add java doc for CMS
1 parent 8bd1423 commit 66f1333

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/main/java/org/apache/datasketches/count/CountMinSketch.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,16 @@
3636
import static java.lang.foreign.ValueLayout.JAVA_SHORT_UNALIGNED;
3737

3838

39+
/**
40+
* Java implementation of the CountMin sketch data structure of Cormode and Muthukrishnan.
41+
* This implementation is inspired by and compatible with the datasketches-cpp version by Charlie Dickens.
42+
*
43+
* The CountMin sketch is a probabilistic data structure that provides frequency estimates for items
44+
* in a data stream. It uses multiple hash functions to distribute items across a two-dimensional array,
45+
* providing approximate counts with configurable error bounds.
46+
*
47+
* Reference: http://dimacs.rutgers.edu/~graham/pubs/papers/cm-full.pdf
48+
*/
3949
public class CountMinSketch {
4050
private final byte numHashes_;
4151
private final int numBuckets_;

0 commit comments

Comments
 (0)