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 java.lang.Object
Field Summary |
private double |
counter
|
private java.util.HashMap<java.lang.String,org.apache.commons.lang.mutable.MutableDouble> |
map
|
Method Summary |
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()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
map
private java.util.HashMap<java.lang.String,org.apache.commons.lang.mutable.MutableDouble> map
counter
private double counter
EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS
public EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS()
EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS
public EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS(java.lang.String[] labels)
getCounter
public double getCounter()
- here we count the sum of all entries
size
public int size()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
increment
public void increment(java.lang.String key)
- increment the counter for the given key
incrementOrAdd
public void incrementOrAdd(java.lang.String key)
- increment the counter for the given key this one checks for existence
entrySet
public java.util.Collection<org.apache.commons.lang.mutable.MutableDouble> entrySet()
keySet
public java.util.Collection<java.lang.String> keySet()
get
public org.apache.commons.lang.mutable.MutableDouble get(java.lang.String key)