at.tuwien.ifs.somtoolbox.layers.quality
Class EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS

java.lang.Object
  extended by 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
           
 
Constructor Summary
EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS()
           
EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS(java.lang.String[] labels)
           
 
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
 

Field Detail

map

private java.util.HashMap<java.lang.String,org.apache.commons.lang.mutable.MutableDouble> map

counter

private double counter
Constructor Detail

EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS

public EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS()

EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS

public EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS(java.lang.String[] labels)
Method Detail

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)