|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.illinois.cs.cogcomp.lbj.coref.util.collections.Histogram<T>
public class Histogram<T>
Field Summary | |
---|---|
(package private) java.util.Map<T,java.lang.Integer> |
m_map
|
Constructor Summary | |
---|---|
Histogram()
|
|
Histogram(java.util.Collection<T> items)
Creates a new histogram, incrementing by one for each occurance of an item in the Collection. |
Method Summary | |
---|---|
void |
addAll(java.util.Map<T,java.lang.Integer> histogram)
increment each key in histogram by the corresponding value. |
int |
get(T item)
Gets the count of item. |
void |
increment(T item)
Increment the count for item, setting it to one if never seen before. |
void |
increment(T item,
int by)
|
java.util.Set<T> |
keySet()
|
void |
set(T item,
int to)
Sets the histogram's value of item to to . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
java.util.Map<T,java.lang.Integer> m_map
Constructor Detail |
---|
public Histogram()
public Histogram(java.util.Collection<T> items)
Method Detail |
---|
public void addAll(java.util.Map<T,java.lang.Integer> histogram)
public int get(T item)
public void set(T item, int to)
item
to to
.
public void increment(T item)
public void increment(T item, int by)
public java.util.Set<T> keySet()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |