|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cloud9.util.count.OpenObject2LongFrequencyDistribution<K>
public class OpenObject2LongFrequencyDistribution<K extends Comparable<K>>
Implementation of Object2LongFrequencyDistribution based on
Object2LongOpenHashMap.
| Constructor Summary | |
|---|---|
OpenObject2LongFrequencyDistribution()
|
|
| 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. |
Object2LongMap.FastEntrySet<K> |
entrySet()
Exposes efficient method for accessing mappings in this map. |
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. |
Iterator<PairOfObjectLong<K>> |
iterator()
Iterator returns the same object every time, just with a different payload. |
ObjectSet<K> |
keySet()
Exposes efficient method for accessing keys in this map. |
long |
remove(K k)
Removes the count of a particular event key. |
long |
set(K k,
long v)
Sets the frequency of a particular event key to cnt. |
LongCollection |
values()
Exposes efficient method for accessing values in this map. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OpenObject2LongFrequencyDistribution()
| Method Detail |
|---|
public void increment(K key)
Object2LongFrequencyDistributionkey.
increment in interface Object2LongFrequencyDistribution<K extends Comparable<K>>
public void increment(K key,
long cnt)
Object2LongFrequencyDistributionkey by cnt.
increment in interface Object2LongFrequencyDistribution<K extends Comparable<K>>public void decrement(K key)
Object2LongFrequencyDistributionkey.
decrement in interface Object2LongFrequencyDistribution<K extends Comparable<K>>
public void decrement(K key,
long cnt)
Object2LongFrequencyDistributionkey by cnt.
decrement in interface Object2LongFrequencyDistribution<K extends Comparable<K>>public boolean contains(K key)
Object2LongFrequencyDistribution
contains in interface Object2LongFrequencyDistribution<K extends Comparable<K>>public long get(K key)
Object2LongFrequencyDistribution
get in interface Object2LongFrequencyDistribution<K extends Comparable<K>>
public long set(K k,
long v)
Object2LongFrequencyDistributioncnt.
set in interface Object2LongFrequencyDistribution<K extends Comparable<K>>public long remove(K k)
Object2LongFrequencyDistributionkey.
remove in interface Object2LongFrequencyDistribution<K extends Comparable<K>>public void clear()
Object2LongFrequencyDistribution
clear in interface Object2LongFrequencyDistribution<K extends Comparable<K>>public ObjectSet<K> keySet()
public LongCollection values()
public Object2LongMap.FastEntrySet<K> entrySet()
public List<PairOfObjectLong<K>> getFrequencySortedEvents()
Object2LongFrequencyDistribution
getFrequencySortedEvents in interface Object2LongFrequencyDistribution<K extends Comparable<K>>public List<PairOfObjectLong<K>> getFrequencySortedEvents(int n)
Object2LongFrequencyDistribution
getFrequencySortedEvents in interface Object2LongFrequencyDistribution<K extends Comparable<K>>public List<PairOfObjectLong<K>> getSortedEvents()
Object2LongFrequencyDistribution
getSortedEvents in interface Object2LongFrequencyDistribution<K extends Comparable<K>>public List<PairOfObjectLong<K>> getSortedEvents(int n)
Object2LongFrequencyDistribution
getSortedEvents in interface Object2LongFrequencyDistribution<K extends Comparable<K>>public int getNumberOfEvents()
Object2LongFrequencyDistribution
getNumberOfEvents in interface Object2LongFrequencyDistribution<K extends Comparable<K>>public long getSumOfFrequencies()
Object2LongFrequencyDistribution
getSumOfFrequencies in interface Object2LongFrequencyDistribution<K extends Comparable<K>>public Iterator<PairOfObjectLong<K>> iterator()
iterator in interface Iterable<PairOfObjectLong<K extends Comparable<K>>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||