at.tuwien.ifs.somtoolbox.layers.quality
Class EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS
java.lang.Object
at.tuwien.ifs.somtoolbox.layers.quality.EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS
- Enclosing class:
- EntropyAndPurityCalculator
public class EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS
- extends Object
map
private HashMap<String,org.apache.commons.lang.mutable.MutableDouble> map
counter
private double counter
EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS
public EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS()
EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS
public EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS(String[] labels)
getCounter
public double getCounter()
- here we count the sum of all entries
size
public int size()
toString
public String toString()
- Overrides:
toString
in class Object
increment
public void increment(String key)
- increment the counter for the given key
incrementOrAdd
public void incrementOrAdd(String key)
- increment the counter for the given key this one checks for existence
entrySet
public Collection<org.apache.commons.lang.mutable.MutableDouble> entrySet()
keySet
public Collection<String> keySet()
get
public org.apache.commons.lang.mutable.MutableDouble get(String key)