|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.stats.TwoDimensionalCounter<K1,K2>
public class TwoDimensionalCounter<K1,K2>
A class representing a mapping between pairs of typed objects and double values.
| Constructor Summary | |
|---|---|
TwoDimensionalCounter()
|
|
TwoDimensionalCounter(MapFactory factory)
|
|
| Method Summary | |
|---|---|
void |
addAll(TwoDimensionalCounter<K1,K2> c)
|
boolean |
containsKey(K1 o1,
K2 o2)
|
Set<K1> |
firstKeySet()
|
Counter<Pair<K1,K2>> |
flatten()
|
double |
getCount(K1 o1,
K2 o2)
|
Counter<K2> |
getCounter(K1 o)
|
MapFactory |
getMapFactory()
|
void |
incrementCount(K1 o1,
K2 o2)
|
void |
incrementCount(K1 o1,
K2 o2,
double count)
|
boolean |
isEmpty()
|
static void |
main(String[] args)
|
static TwoDimensionalCounter |
reverseIndexOrder(TwoDimensionalCounter cc)
Produces a new ConditionalCounter. |
Set<K2> |
secondKeySet()
|
void |
setCount(K1 o1,
K2 o2,
double count)
|
Counter<K2> |
setCounter(K1 o,
Counter<K2> c)
|
int |
size()
|
void |
subtractAll(TwoDimensionalCounter<K1,K2> c,
boolean removeKeys)
|
String |
toCSVString(NumberFormat nf)
|
String |
toDatFileString()
|
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)
|
String |
toString()
|
double |
totalCount()
Takes linear time. |
double |
totalCount(K1 k1)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public TwoDimensionalCounter()
public TwoDimensionalCounter(MapFactory factory)
| Method Detail |
|---|
public Counter<K2> getCounter(K1 o)
o -
public int size()
public boolean containsKey(K1 o1,
K2 o2)
public void incrementCount(K1 o1,
K2 o2)
o1 - o2 -
public void incrementCount(K1 o1,
K2 o2,
double count)
o1 - o2 - count -
public void setCount(K1 o1,
K2 o2,
double count)
o1 - o2 - count -
public double getCount(K1 o1,
K2 o2)
o1 - o2 -
public double totalCount()
public double totalCount(K1 k1)
public Set<K1> firstKeySet()
public Counter<K2> setCounter(K1 o,
Counter<K2> c)
public static TwoDimensionalCounter reverseIndexOrder(TwoDimensionalCounter cc)
cc -
public String toString()
toString in class Objectpublic String toDatFileString()
public String toMatrixString(int cellSize)
public double[][] toMatrix(List<K1> firstKeys,
List<K2> secondKeys)
firstKeys - secondKeys -
public String toCSVString(NumberFormat nf)
public Set<K2> secondKeySet()
public boolean isEmpty()
public Counter<Pair<K1,K2>> flatten()
public void addAll(TwoDimensionalCounter<K1,K2> c)
public void subtractAll(TwoDimensionalCounter<K1,K2> c,
boolean removeKeys)
public MapFactory getMapFactory()
public static void main(String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||