Package 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsKey(K1 o1, K2 o2)voiddecrementCount(K1 o1, K2 o2)voiddecrementCount(K1 o1, K2 o2, double count)doubledefaultReturnValue()voiddefaultReturnValue(double rv)Set<K1>firstKeySet()doublegetCount(K1 o1, K2 o2)Counter<K2>getCounter(K1 o)voidincrementCount(K1 o1, K2 o2)voidincrementCount(K1 o1, K2 o2, double count)booleanisEmpty()voidremove(K1 key)doubleremove(K1 o1, K2 o2)Set<K2>secondKeySet()voidsetCount(K1 o1, K2 o2, double count)intsize()StringtoCSVString(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.StringtoMatrixString(int cellSize)doubletotalCount()doubletotalCount(K1 k1)
-
-
-
Method Detail
-
defaultReturnValue
void defaultReturnValue(double rv)
-
defaultReturnValue
double defaultReturnValue()
-
size
int size()
- Returns:
- total number of entries (key pairs)
-
totalCount
double totalCount()
-
totalCount
double totalCount(K1 k1)
-
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)
-
-