public final class FrequencySketch extends Object
Modifier and Type | Method and Description |
---|---|
void |
ensureCapacity(long maximumSize)
Initializes and 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(int hash)
Returns the estimated number of occurrences of an element, up to the maximum (15).
|
void |
increment(int hash)
Increments the popularity of the element if it does not exceed the maximum (15).
|
public void ensureCapacity(long maximumSize)
maximumSize
- the maximum size of the cachepublic int frequency(int hash)
hash
- the hash code of element to count occurrences ofpublic void increment(int hash)
hash
- the hash code of elementCopyright © 2009–2020 OrientDB. All rights reserved.