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 Object


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

Field Detail

map

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

counter

private double counter
Constructor Detail

EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS

public EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS()

EntropyAndPurityCalculator.LabelledCounterMapToBePutInCOMMONS

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

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)