|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Object2LongFrequencyDistribution<K extends Comparable<K>>
A frequency distribution where events are arbitrary objects and counts are ints.
| Method Summary | |
|---|---|
void |
clear()
Removes all events. |
boolean |
contains(K key)
Returns true if key exists in this object. |
void |
decrement(K key)
Decrements the frequency of an event key. |
void |
decrement(K key,
long cnt)
Decrements the frequency of a particular event key by cnt. |
long |
get(K key)
Returns the frequency of a particular event key. |
List<PairOfObjectLong<K>> |
getFrequencySortedEvents()
Returns events sorted by frequency of occurrence. |
List<PairOfObjectLong<K>> |
getFrequencySortedEvents(int n)
Returns top n events sorted by frequency of occurrence. |
int |
getNumberOfEvents()
Returns number of distinct events observed. |
List<PairOfObjectLong<K>> |
getSortedEvents()
Returns events in sorted order. |
List<PairOfObjectLong<K>> |
getSortedEvents(int n)
Returns top n events in sorted order. |
long |
getSumOfFrequencies()
Returns the sum of frequencies of all observed events. |
void |
increment(K key)
Increments the frequency of an event key. |
void |
increment(K key,
long cnt)
Increments the frequency of an event key by cnt. |
long |
remove(K k)
Removes the count of a particular event key. |
long |
set(K key,
long cnt)
Sets the frequency of a particular event key to cnt. |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
void increment(K key)
key.
void increment(K key,
long cnt)
key by cnt.
void decrement(K key)
key.
void decrement(K key,
long cnt)
key by cnt.
boolean contains(K key)
long get(K key)
long set(K key,
long cnt)
cnt.
long remove(K k)
key.
void clear()
List<PairOfObjectLong<K>> getFrequencySortedEvents()
List<PairOfObjectLong<K>> getFrequencySortedEvents(int n)
List<PairOfObjectLong<K>> getSortedEvents()
List<PairOfObjectLong<K>> getSortedEvents(int n)
int getNumberOfEvents()
long getSumOfFrequencies()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||