|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Object2IntFrequencyDistribution<K extends Comparable<K>>
A frequency distribution where events are arbitrary objects and counts are ints.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface tl.lin.data.SortableEntries |
|---|
SortableEntries.Order |
| Method Summary | |
|---|---|
void |
clear()
Removes all events. |
double |
computeLogRelativeFrequency(K key)
Computes the log (base e) of the relative frequency of a particular event key. |
double |
computeRelativeFrequency(K key)
Computes the relative frequency of a particular event key. |
boolean |
contains(K key)
Returns true if key exists in this object. |
void |
decrement(K key)
Decrements the count of an event key. |
void |
decrement(K key,
int cnt)
Decrements the count of a particular event key by cnt. |
int |
get(K key)
Returns the count of a particular event key. |
int |
getNumberOfEvents()
Returns number of distinct events observed. |
long |
getSumOfCounts()
Returns the sum of counts of all observed events. |
void |
increment(K key)
Increments the count of an event key. |
void |
increment(K key,
int cnt)
Increments the count of an event key by cnt. |
Set<K> |
keySet()
Returns the set of keys. |
int |
remove(K k)
Removes the count of a particular event key. |
int |
set(K key,
int cnt)
Sets the count of a particular event key to cnt. |
| Methods inherited from interface tl.lin.data.SortableEntries |
|---|
getEntries, getEntries |
| Methods inherited from interface java.lang.Iterable |
|---|
iterator |
| Method Detail |
|---|
void increment(K key)
key.
void increment(K key,
int cnt)
key by cnt.
void decrement(K key)
key.
void decrement(K key,
int cnt)
key by cnt.
boolean contains(K key)
true if key exists in this object.
int get(K key)
key.
double computeRelativeFrequency(K key)
key.
That is, f(key) / SUM_i f(key_i).
double computeLogRelativeFrequency(K key)
key.
int set(K key,
int cnt)
key to cnt.
int remove(K k)
key.
void clear()
int getNumberOfEvents()
long getSumOfCounts()
SUM_i f(key_i).
Set<K> keySet()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||