KeyType - Type of Key in the distributionpublic static class DefaultDataDistribution.PMF<KeyType> extends DefaultDataDistribution<KeyType> implements DataDistribution.PMF<KeyType>
DefaultDataDistribution.DefaultFactory<DataType>, DefaultDataDistribution.Estimator<KeyType>, DefaultDataDistribution.PMF<KeyType>, DefaultDataDistribution.WeightedEstimator<KeyType>AbstractMutableDoubleMap.Entry<KeyType>, AbstractMutableDoubleMap.SimpleEntry<KeyType>, AbstractMutableDoubleMap.SimpleEntrySet<KeyType>, AbstractMutableDoubleMap.SimpleIterator<KeyType>DataDistribution.PMF<KeyType>ScalarMap.Entry<KeyType>DEFAULT_INITIAL_CAPACITY, totalmap| Constructor and Description |
|---|
PMF()
Default constructor
|
PMF(DataDistribution<KeyType> other)
Copy constructor
|
PMF(int initialCapacity)
Creates a new instance of DefaultDataDistribution
|
PMF(java.lang.Iterable<? extends KeyType> data)
Creates a new instance of ScalarDataDistribution
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Double |
evaluate(KeyType input)
Evaluates the function on the given input and returns the output.
|
DefaultDataDistribution.PMF<KeyType> |
getProbabilityFunction()
Gets the distribution function associated with this Distribution,
either the PDF or PMF.
|
double |
logEvaluate(KeyType input)
Evaluate the natural logarithm of the distribution function.
|
clear, clone, getEstimator, getMeanValue, getTotal, increment, setfromInfiniteVector, getDomain, getDomainSize, getEntropy, getFraction, getLogFraction, getMaxValue, getMinValue, sample, sample, sampleInto, toInfiniteVectorasMap, compact, entrySet, getcontainsKey, decrement, decrement, decrementAll, decrementAll, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, increment, incrementAll, incrementAll, isEmpty, keySet, setAll, setAll, sizeequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclone, fromInfiniteVector, getEntropy, getEstimator, getFraction, getLogFraction, getTotal, toInfiniteVectorasMap, decrement, decrement, decrementAll, decrementAll, entrySet, get, getMaxValue, getMinValue, increment, increment, incrementAll, incrementAll, set, setAll, setAllclear, containsKey, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, isEmpty, keySet, sizegetEntropygetDomain, getDomainSizesample, sample, sampleIntopublic PMF()
public PMF(DataDistribution<KeyType> other)
other - ScalarDataDistribution to copypublic PMF(int initialCapacity)
initialCapacity - Initial capacity of the Mappublic PMF(java.lang.Iterable<? extends KeyType> data)
data - Data to create the distributionpublic double logEvaluate(KeyType input)
ProbabilityFunctionlogEvaluate in interface ProbabilityFunction<KeyType>input - The input to be evaluatedpublic java.lang.Double evaluate(KeyType input)
Evaluatorpublic DefaultDataDistribution.PMF<KeyType> getProbabilityFunction()
ComputableDistributiongetProbabilityFunction in interface ComputableDistribution<KeyType>getProbabilityFunction in interface DataDistribution<KeyType>getProbabilityFunction in interface DiscreteDistribution<KeyType>getProbabilityFunction in interface ProbabilityMassFunction<KeyType>getProbabilityFunction in class DefaultDataDistribution<KeyType>