public class EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private double |
counter |
private java.util.HashMap<java.lang.String,org.apache.commons.lang.mutable.MutableDouble> |
map |
Constructor and Description |
---|
LabelledCounterMapToBePutInCOMMONS() |
LabelledCounterMapToBePutInCOMMONS(java.lang.String[] labels) |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<org.apache.commons.lang.mutable.MutableDouble> |
entrySet() |
org.apache.commons.lang.mutable.MutableDouble |
get(java.lang.String key) |
double |
getCounter()
here we count the sum of all entries
|
void |
increment(java.lang.String key)
increment the counter for the given key
|
void |
incrementOrAdd(java.lang.String key)
increment the counter for the given key this one checks for existence
|
java.util.Collection<java.lang.String> |
keySet() |
int |
size() |
java.lang.String |
toString() |
private java.util.HashMap<java.lang.String,org.apache.commons.lang.mutable.MutableDouble> map
private double counter
public LabelledCounterMapToBePutInCOMMONS()
public LabelledCounterMapToBePutInCOMMONS(java.lang.String[] labels)
public double getCounter()
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public void increment(java.lang.String key)
public void incrementOrAdd(java.lang.String key)
public java.util.Collection<org.apache.commons.lang.mutable.MutableDouble> entrySet()
public java.util.Collection<java.lang.String> keySet()
public org.apache.commons.lang.mutable.MutableDouble get(java.lang.String key)