gov.sandia.cognition.statistics.distribution
Class ScalarDataDistribution.CDF

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.collection.AbstractScalarMap<KeyType>
          extended by gov.sandia.cognition.collection.AbstractMutableDoubleMap<KeyType>
              extended by gov.sandia.cognition.statistics.AbstractDataDistribution<KeyType>
                  extended by gov.sandia.cognition.statistics.distribution.DefaultDataDistribution<Double>
                      extended by gov.sandia.cognition.statistics.distribution.ScalarDataDistribution
                          extended by gov.sandia.cognition.statistics.distribution.ScalarDataDistribution.CDF
All Implemented Interfaces:
NumericMap<Double>, ScalarMap<Double>, Evaluator<Double,Double>, ComputableDistribution<Double>, CumulativeDistributionFunction<Double>, DataDistribution<Double>, DiscreteDistribution<Double>, Distribution<Double>, DistributionWithMean<Double>, EstimableDistribution<Double,DataDistribution<Double>>, UnivariateDistribution<Double>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
ScalarDataDistribution

public static class ScalarDataDistribution.CDF
extends ScalarDataDistribution
implements CumulativeDistributionFunction<Double>

CDF of the ScalarDataDistribution, maintains the keys/domain in sorted order (TreeMap), so it's slower than it's peers.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.ScalarDataDistribution
ScalarDataDistribution.CDF, ScalarDataDistribution.Estimator, ScalarDataDistribution.PMF
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.DefaultDataDistribution
DefaultDataDistribution.DefaultFactory<DataType>, DefaultDataDistribution.WeightedEstimator<KeyType>
 
Nested classes/interfaces inherited from class gov.sandia.cognition.collection.AbstractMutableDoubleMap
AbstractMutableDoubleMap.SimpleEntry<KeyType>, AbstractMutableDoubleMap.SimpleEntrySet<KeyType>, AbstractMutableDoubleMap.SimpleIterator<KeyType>
 
Nested classes/interfaces inherited from class gov.sandia.cognition.collection.AbstractScalarMap
AbstractScalarMap.MapWrapper
 
Nested classes/interfaces inherited from interface gov.sandia.cognition.collection.ScalarMap
ScalarMap.Entry<KeyType>
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.distribution.DefaultDataDistribution
DEFAULT_INITIAL_CAPACITY, total
 
Fields inherited from class gov.sandia.cognition.collection.AbstractMutableDoubleMap
map
 
Constructor Summary
ScalarDataDistribution.CDF()
          Default constructor
ScalarDataDistribution.CDF(Iterable<? extends Number> data)
          Creates a new instance of PMF
ScalarDataDistribution.CDF(ScalarDataDistribution other)
          Copy constructor
 
Method Summary
 ScalarDataDistribution.CDF clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 Double evaluate(Double input)
          Evaluates the function on the given input and returns the output.
 ScalarDataDistribution.CDF getCDF()
          Gets the CDF of a scalar distribution.
 Double getMaxSupport()
          Gets the minimum support (domain or input) of the distribution.
 Double getMinSupport()
          Gets the minimum support (domain or input) of the distribution.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.ScalarDataDistribution
getEstimator, getMean, getProbabilityFunction, getVariance
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.DefaultDataDistribution
clear, getMeanValue, getTotal, increment, set
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractDataDistribution
fromInfiniteVector, getDomain, getDomainSize, getEntropy, getFraction, getLogFraction, getMaxValue, getMinValue, sample, sample, toInfiniteVector
 
Methods inherited from class gov.sandia.cognition.collection.AbstractMutableDoubleMap
asMap, compact, containsKey, entrySet, get, keySet, size
 
Methods inherited from class gov.sandia.cognition.collection.AbstractScalarMap
decrement, decrement, decrementAll, decrementAll, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, increment, incrementAll, incrementAll, isEmpty, setAll
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.statistics.UnivariateDistribution
getVariance
 
Methods inherited from interface gov.sandia.cognition.statistics.DistributionWithMean
getMean
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample, sample
 
Methods inherited from interface gov.sandia.cognition.collection.ScalarMap
asMap, decrement, decrement, decrementAll, decrementAll, entrySet, get, increment, incrementAll, incrementAll, setAll
 
Methods inherited from interface gov.sandia.cognition.collection.NumericMap
containsKey, getMaxValueKey, getMaxValueKeys, getMinValueKey, getMinValueKeys, isEmpty, keySet, size
 

Constructor Detail

ScalarDataDistribution.CDF

public ScalarDataDistribution.CDF()
Default constructor


ScalarDataDistribution.CDF

public ScalarDataDistribution.CDF(ScalarDataDistribution other)
Copy constructor

Parameters:
other - ScalarDataDistribution to copy

ScalarDataDistribution.CDF

public ScalarDataDistribution.CDF(Iterable<? extends Number> data)
Creates a new instance of PMF

Parameters:
data - Data used to create the PMF
Method Detail

clone

public ScalarDataDistribution.CDF clone()
Description copied from class: AbstractCloneableSerializable
This makes public the clone method on the Object class and removes the exception that it throws. Its default behavior is to automatically create a clone of the exact type of object that the clone is called on and to copy all primitives but to keep all references, which means it is a shallow copy. Extensions of this class may want to override this method (but call super.clone() to implement a "smart copy". That is, to target the most common use case for creating a copy of the object. Because of the default behavior being a shallow copy, extending classes only need to handle fields that need to have a deeper copy (or those that need to be reset). Some of the methods in ObjectUtil may be helpful in implementing a custom clone method. Note: The contract of this method is that you must use super.clone() as the basis for your implementation.

Specified by:
clone in interface DataDistribution<Double>
Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class ScalarDataDistribution
Returns:
A clone of this object.

getMinSupport

public Double getMinSupport()
Description copied from interface: UnivariateDistribution
Gets the minimum support (domain or input) of the distribution.

Specified by:
getMinSupport in interface UnivariateDistribution<Double>
Overrides:
getMinSupport in class ScalarDataDistribution
Returns:
Minimum support.

getMaxSupport

public Double getMaxSupport()
Description copied from interface: UnivariateDistribution
Gets the minimum support (domain or input) of the distribution.

Specified by:
getMaxSupport in interface UnivariateDistribution<Double>
Overrides:
getMaxSupport in class ScalarDataDistribution
Returns:
Minimum support.

getCDF

public ScalarDataDistribution.CDF getCDF()
Description copied from interface: UnivariateDistribution
Gets the CDF of a scalar distribution.

Specified by:
getCDF in interface UnivariateDistribution<Double>
Overrides:
getCDF in class ScalarDataDistribution
Returns:
CDF of the scalar distribution.

evaluate

public Double evaluate(Double input)
Description copied from interface: Evaluator
Evaluates the function on the given input and returns the output.

Specified by:
evaluate in interface Evaluator<Double,Double>
Parameters:
input - The input to evaluate.
Returns:
The output produced by evaluating the input.