edu.stanford.nlp.stats
Interface TwoDimensionalCounterInterface<K1,K2>
- All Known Implementing Classes:
- TwoDimensionalCounter
public interface TwoDimensionalCounterInterface<K1,K2>
Interface representing a mapping between pairs of typed objects and double
values.
- Author:
- Angel Chang
Method Summary |
boolean |
containsKey(K1 o1,
K2 o2)
|
void |
decrementCount(K1 o1,
K2 o2)
|
void |
decrementCount(K1 o1,
K2 o2,
double count)
|
double |
defaultReturnValue()
|
void |
defaultReturnValue(double rv)
|
Set<K1> |
firstKeySet()
|
double |
getCount(K1 o1,
K2 o2)
|
Counter<K2> |
getCounter(K1 o)
|
void |
incrementCount(K1 o1,
K2 o2)
|
void |
incrementCount(K1 o1,
K2 o2,
double count)
|
boolean |
isEmpty()
|
void |
remove(K1 key)
|
double |
remove(K1 o1,
K2 o2)
|
Set<K2> |
secondKeySet()
|
void |
setCount(K1 o1,
K2 o2,
double count)
|
int |
size()
|
String |
toCSVString(NumberFormat nf)
|
double[][] |
toMatrix(List<K1> firstKeys,
List<K2> secondKeys)
Given an ordering of the first (row) and second (column) keys, will produce
a double matrix. |
String |
toMatrixString(int cellSize)
|
double |
totalCount()
|
double |
totalCount(K1 k1)
|
defaultReturnValue
void defaultReturnValue(double rv)
defaultReturnValue
double defaultReturnValue()
size
int size()
- Returns:
- total number of entries (key pairs)
containsKey
boolean containsKey(K1 o1,
K2 o2)
incrementCount
void incrementCount(K1 o1,
K2 o2)
incrementCount
void incrementCount(K1 o1,
K2 o2,
double count)
decrementCount
void decrementCount(K1 o1,
K2 o2)
decrementCount
void decrementCount(K1 o1,
K2 o2,
double count)
setCount
void setCount(K1 o1,
K2 o2,
double count)
remove
double remove(K1 o1,
K2 o2)
getCount
double getCount(K1 o1,
K2 o2)
totalCount
double totalCount()
totalCount
double totalCount(K1 k1)
firstKeySet
Set<K1> firstKeySet()
secondKeySet
Set<K2> secondKeySet()
isEmpty
boolean isEmpty()
remove
void remove(K1 key)
toMatrixString
String toMatrixString(int cellSize)
toMatrix
double[][] toMatrix(List<K1> firstKeys,
List<K2> secondKeys)
- Given an ordering of the first (row) and second (column) keys, will produce
a double matrix.
toCSVString
String toCSVString(NumberFormat nf)
getCounter
Counter<K2> getCounter(K1 o)
- Returns:
- the inner Counter associated with key o
Stanford NLP Group