|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cloud9.util.count.OpenObject2IntFrequencyDistribution<K>
public class OpenObject2IntFrequencyDistribution<K extends Comparable<K>>
Implementation of Object2IntFrequencyDistribution based on
Object2IntOpenHashMap.
| Constructor Summary | |
|---|---|
OpenObject2IntFrequencyDistribution()
|
|
| Method Summary | |
|---|---|
void |
clear()
Removes all events. |
boolean |
contains(K k)
Returns true if key exists in this object. |
void |
decrement(K key)
Decrements the frequency of an event key. |
void |
decrement(K key,
int cnt)
Decrements the frequency of a particular event key by cnt. |
Object2IntMap.FastEntrySet<K> |
entrySet()
Exposes efficient method for accessing mappings in this map. |
int |
get(K k)
Returns the frequency of a particular event key. |
List<PairOfObjectInt<K>> |
getFrequencySortedEvents()
Returns events sorted by frequency of occurrence. |
List<PairOfObjectInt<K>> |
getFrequencySortedEvents(int n)
Returns top n events sorted by frequency of occurrence. |
int |
getNumberOfEvents()
Returns number of distinct events observed. |
List<PairOfObjectInt<K>> |
getSortedEvents()
Returns events in sorted order. |
List<PairOfObjectInt<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,
int cnt)
Increments the frequency of an event key by cnt. |
Iterator<PairOfObjectInt<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. |
int |
remove(K k)
Removes the count of a particular event key. |
int |
set(K k,
int v)
Sets the frequency of a particular event key to cnt. |
IntCollection |
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 OpenObject2IntFrequencyDistribution()
| Method Detail |
|---|
public void increment(K key)
Object2IntFrequencyDistributionkey.
increment in interface Object2IntFrequencyDistribution<K extends Comparable<K>>
public void increment(K key,
int cnt)
Object2IntFrequencyDistributionkey by cnt.
increment in interface Object2IntFrequencyDistribution<K extends Comparable<K>>public void decrement(K key)
Object2IntFrequencyDistributionkey.
decrement in interface Object2IntFrequencyDistribution<K extends Comparable<K>>
public void decrement(K key,
int cnt)
Object2IntFrequencyDistributionkey by cnt.
decrement in interface Object2IntFrequencyDistribution<K extends Comparable<K>>public boolean contains(K k)
Object2IntFrequencyDistribution
contains in interface Object2IntFrequencyDistribution<K extends Comparable<K>>public int get(K k)
Object2IntFrequencyDistribution
get in interface Object2IntFrequencyDistribution<K extends Comparable<K>>
public int set(K k,
int v)
Object2IntFrequencyDistributioncnt.
set in interface Object2IntFrequencyDistribution<K extends Comparable<K>>public int remove(K k)
Object2IntFrequencyDistributionkey.
remove in interface Object2IntFrequencyDistribution<K extends Comparable<K>>public void clear()
Object2IntFrequencyDistribution
clear in interface Object2IntFrequencyDistribution<K extends Comparable<K>>public ObjectSet<K> keySet()
public IntCollection values()
public Object2IntMap.FastEntrySet<K> entrySet()
public List<PairOfObjectInt<K>> getFrequencySortedEvents()
Object2IntFrequencyDistribution
getFrequencySortedEvents in interface Object2IntFrequencyDistribution<K extends Comparable<K>>public List<PairOfObjectInt<K>> getFrequencySortedEvents(int n)
Object2IntFrequencyDistribution
getFrequencySortedEvents in interface Object2IntFrequencyDistribution<K extends Comparable<K>>public List<PairOfObjectInt<K>> getSortedEvents()
Object2IntFrequencyDistribution
getSortedEvents in interface Object2IntFrequencyDistribution<K extends Comparable<K>>public List<PairOfObjectInt<K>> getSortedEvents(int n)
Object2IntFrequencyDistribution
getSortedEvents in interface Object2IntFrequencyDistribution<K extends Comparable<K>>public int getNumberOfEvents()
Object2IntFrequencyDistribution
getNumberOfEvents in interface Object2IntFrequencyDistribution<K extends Comparable<K>>public long getSumOfFrequencies()
Object2IntFrequencyDistribution
getSumOfFrequencies in interface Object2IntFrequencyDistribution<K extends Comparable<K>>public Iterator<PairOfObjectInt<K>> iterator()
iterator in interface Iterable<PairOfObjectInt<K extends Comparable<K>>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||