public class Histogram<T extends Comparable> extends TreeMap<T,MutableInt>
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
Modifier and Type | Field and Description |
---|---|
static double |
ln2_1 |
protected static Logger |
logger |
Constructor and Description |
---|
Histogram() |
Modifier and Type | Method and Description |
---|---|
int |
addObject(T object) |
int |
addObject(T object,
int frequency) |
void |
clearFlag() |
int |
count() |
double |
entropy()
Information entropy of a discrete probability distribution pi
|
protected boolean |
getFlag(T object) |
int |
getFrequency(T object) |
protected double |
getFrequencySum(boolean flag,
MutableInt count) |
Iterator<Map.Entry<T,MutableInt>> |
getIterator() |
Object |
getMaxFrequency() |
double |
hellinger(Histogram hist)
Hellinger distance between two discrete probability distributions pi and qi * @param hist
|
protected double |
relativeEntropy(Histogram hist)
Kullback-Leibler distance (or relative entropy) between two discrete probability distributions pi and qi * @param hist
|
void |
setFlag(T object,
boolean value) |
double |
tanimoto(Histogram hist) |
String |
toString() |
ceilingEntry, ceilingKey, clear, clone, comparator, containsKey, containsValue, descendingKeySet, descendingMap, entrySet, firstEntry, firstKey, floorEntry, floorKey, forEach, get, headMap, headMap, higherEntry, higherKey, keySet, lastEntry, lastKey, lowerEntry, lowerKey, navigableKeySet, pollFirstEntry, pollLastEntry, put, putAll, remove, replace, replace, replaceAll, size, subMap, subMap, tailMap, tailMap, values
equals, hashCode, isEmpty
finalize, getClass, notify, notifyAll, wait, wait, wait
compute, computeIfAbsent, computeIfPresent, equals, getOrDefault, hashCode, isEmpty, merge, putIfAbsent, remove
protected static Logger logger
public static final double ln2_1
public void clearFlag()
public int addObject(T object, int frequency)
public int addObject(T object)
protected boolean getFlag(T object)
public void setFlag(T object, boolean value)
public int getFrequency(T object)
public Object getMaxFrequency()
public int count()
public double entropy()
protected double relativeEntropy(Histogram hist) throws Exception
Exception
public Iterator<Map.Entry<T,MutableInt>> getIterator()
public double tanimoto(Histogram hist)
public double hellinger(Histogram hist) throws Exception
Exception
protected double getFrequencySum(boolean flag, MutableInt count)
public String toString()
toString
in class AbstractMap<T extends Comparable,MutableInt>
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.