public interface Int2LongFrequencyDistribution extends SortableEntries<PairOfIntLong>, org.apache.hadoop.io.Writable
SortableEntries.Order| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all events.
|
double |
computeLogRelativeFrequency(int key)
Computes the log (base e) of the relative frequency of a particular event
key. |
double |
computeRelativeFrequency(int key)
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. |
long |
get(int 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(int key)
Increments the count of an event
key. |
void |
increment(int key,
long cnt)
Increments the count of an event
key by cnt. |
long |
remove(int k)
Removes the count of a particular event
key. |
long |
set(int key,
long cnt)
Sets the count of a particular event
key to cnt. |
getEntries, getEntriesforEach, iterator, spliteratorvoid increment(int key)
key.void increment(int key,
long cnt)
key by cnt.void decrement(int key)
key.void decrement(int key,
long cnt)
key by cnt.boolean contains(int key)
true if key exists in this object.long get(int key)
key.double computeRelativeFrequency(int key)
key. That is,
f(key) / SUM_i f(key_i).double computeLogRelativeFrequency(int key)
key.long set(int key,
long cnt)
key to cnt.long remove(int k)
key.void clear()
int getNumberOfEvents()
long getSumOfCounts()
SUM_i f(key_i).Copyright © 2018. All rights reserved.