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