public class CountMinSketch<T> extends Object
| Constructor and Description |
|---|
CountMinSketch(int tableWidth,
int tableHeight,
com.google.common.hash.Funnel<T> funnel)
Creates a new CountMinSketch.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(T obj)
Adds this object to the min sketch.
|
int |
approximateCount(T obj)
Gives an approximate count of how often this element was seen through
add(Object). |
public CountMinSketch(int tableWidth,
int tableHeight,
com.google.common.hash.Funnel<T> funnel)
tableWidth - the width of the counter table.tableHeight - the height of the counter table (as in how many hashing
functions to use).funnel - the funnel to hash an object.public void add(T obj)
public int approximateCount(T obj)
add(Object).Copyright © 2016. All rights reserved.