public abstract class CountMin4 extends Object implements Frequency
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
conservative |
protected int |
step |
protected long[] |
table |
protected int |
tableMask |
| Modifier | Constructor and Description |
|---|---|
protected |
CountMin4(Config config)
Creates a frequency sketch that can accurately estimate the popularity of elements given
the maximum size of the cache.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
ensureCapacity(long maximumSize)
Increases the capacity of this FrequencySketch instance, if necessary, to ensure that
it can accurately estimate the popularity of elements given the maximum size of the cache.
|
int |
frequency(long e)
Returns the estimated number of occurrences of an element, up to the maximum (15).
|
void |
increment(long e)
Increments the popularity of the element if it does not exceed the maximum (15).
|
protected void |
tryReset(boolean added)
Performs the aging process after an addition to allow old entries to fade away.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreportMissprotected final boolean conservative
protected int tableMask
protected long[] table
protected int step
protected CountMin4(Config config)
protected void ensureCapacity(long maximumSize)
maximumSize - the maximum size of the cachepublic int frequency(long e)
public void increment(long e)
protected void tryReset(boolean added)