|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cloud9.util.fd.Int2LongFrequencyDistributionFastutil
public class Int2LongFrequencyDistributionFastutil
Implementation of Int2LongFrequencyDistribution based on Int2LongOpenHashMap.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface edu.umd.cloud9.util.SortableEntries |
|---|
SortableEntries.Order |
| Constructor Summary | |
|---|---|
Int2LongFrequencyDistributionFastutil()
|
|
| Method Summary | |
|---|---|
void |
clear()
Removes all events. |
double |
computeLogRelativeFrequency(int k)
Computes the log (base e) of the relative frequency of a particular event key. |
double |
computeRelativeFrequency(int k)
Computes the relative frequency of a particular event key. |
boolean |
contains(int key)
Returns true if key exists in this object. |
void |
decrement(int key)
Decrements the count of an event key. |
void |
decrement(int key,
long cnt)
Decrements the count of a particular event key by cnt. |
Int2LongMap.FastEntrySet |
entrySet()
Exposes efficient method for accessing mappings in this map. |
long |
get(int key)
Returns the count of a particular event key. |
List<PairOfIntLong> |
getEntries(SortableEntries.Order ordering)
|
List<PairOfIntLong> |
getEntries(SortableEntries.Order ordering,
int n)
|
int |
getNumberOfEvents()
Returns number of distinct events observed. |
long |
getSumOfCounts()
Returns the sum of counts of all observed events. |
void |
increment(int key)
Increments the count of an event key. |
void |
increment(int key,
long cnt)
Increments the count of an event key by cnt. |
Iterator<PairOfIntLong> |
iterator()
Iterator returns the same object every time, just with a different payload. |
IntSet |
keySet()
Exposes efficient method for accessing keys in this map. |
long |
remove(int k)
Removes the count of a particular event key. |
long |
set(int k,
long v)
Sets the count 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 Int2LongFrequencyDistributionFastutil()
| Method Detail |
|---|
public void increment(int key)
Int2LongFrequencyDistributionkey.
increment in interface Int2LongFrequencyDistribution
public void increment(int key,
long cnt)
Int2LongFrequencyDistributionkey by cnt.
increment in interface Int2LongFrequencyDistributionpublic void decrement(int key)
Int2LongFrequencyDistributionkey.
decrement in interface Int2LongFrequencyDistribution
public void decrement(int key,
long cnt)
Int2LongFrequencyDistributionkey by cnt.
decrement in interface Int2LongFrequencyDistributionpublic boolean contains(int key)
Int2LongFrequencyDistributiontrue if key exists in this object.
contains in interface Int2LongFrequencyDistributionpublic long get(int key)
Int2LongFrequencyDistributionkey.
get in interface Int2LongFrequencyDistributionpublic double computeRelativeFrequency(int k)
Int2LongFrequencyDistributionkey.
That is, f(key) / SUM_i f(key_i).
computeRelativeFrequency in interface Int2LongFrequencyDistributionpublic double computeLogRelativeFrequency(int k)
Int2LongFrequencyDistributionkey.
computeLogRelativeFrequency in interface Int2LongFrequencyDistribution
public long set(int k,
long v)
Int2LongFrequencyDistributionkey to cnt.
set in interface Int2LongFrequencyDistributionpublic long remove(int k)
Int2LongFrequencyDistributionkey.
remove in interface Int2LongFrequencyDistributionpublic void clear()
Int2LongFrequencyDistribution
clear in interface Int2LongFrequencyDistributionpublic IntSet keySet()
public LongCollection values()
public Int2LongMap.FastEntrySet entrySet()
public int getNumberOfEvents()
Int2LongFrequencyDistribution
getNumberOfEvents in interface Int2LongFrequencyDistributionpublic long getSumOfCounts()
Int2LongFrequencyDistributionSUM_i f(key_i).
getSumOfCounts in interface Int2LongFrequencyDistributionpublic Iterator<PairOfIntLong> iterator()
iterator in interface Iterable<PairOfIntLong>public List<PairOfIntLong> getEntries(SortableEntries.Order ordering)
getEntries in interface SortableEntries<PairOfIntLong>
public List<PairOfIntLong> getEntries(SortableEntries.Order ordering,
int n)
getEntries in interface SortableEntries<PairOfIntLong>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||