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

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.AbstractDistribution<NumberType>
          extended by gov.sandia.cognition.statistics.AbstractClosedFormUnivariateDistribution<Double>
              extended by gov.sandia.cognition.statistics.AbstractClosedFormSmoothUnivariateDistribution
                  extended by gov.sandia.cognition.statistics.distribution.UniformDistribution
                      extended by gov.sandia.cognition.statistics.distribution.UniformDistribution.CDF
All Implemented Interfaces:
Evaluator<Double,Double>, ClosedFormDifferentiableEvaluator<Double,Double,Double>, DifferentiableEvaluator<Double,Double,Double>, Vectorizable, ScalarFunction<Double>, UnivariateScalarFunction, ClosedFormComputableDistribution<Double>, ClosedFormCumulativeDistributionFunction<Double>, ClosedFormDistribution<Double>, ClosedFormUnivariateDistribution<Double>, ComputableDistribution<Double>, CumulativeDistributionFunction<Double>, Distribution<Double>, DistributionWithMean<Double>, EstimableDistribution<Double,UniformDistribution>, InvertibleCumulativeDistributionFunction<Double>, SmoothCumulativeDistributionFunction, SmoothUnivariateDistribution, UnivariateDistribution<Double>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
UniformDistribution

public static class UniformDistribution.CDF
extends UniformDistribution
implements SmoothCumulativeDistributionFunction, InvertibleCumulativeDistributionFunction<Double>

Cumulative Distribution Function of a uniform

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.UniformDistribution
UniformDistribution.CDF, UniformDistribution.MaximumLikelihoodEstimator, UniformDistribution.PDF
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.distribution.UniformDistribution
DEFAULT_MAX, DEFAULT_MIN
 
Constructor Summary
UniformDistribution.CDF()
          Creates a new instance of CDF
UniformDistribution.CDF(double minSupport, double maxSupport)
          Creates a new instance of CDF
UniformDistribution.CDF(UniformDistribution other)
          Copy constructor
 
Method Summary
 UniformDistribution.CDF clone()
          This makes public the clone method on the Object class and removes the exception that it throws.
 Double differentiate(Double input)
          Differentiates the output with respect to the input
 double evaluate(double input)
          Produces a double output for the given double input
 Double evaluate(Double input)
          Evaluates the function on the given input and returns the output.
static double evaluate(double input, double minSupport, double maxSupport)
          Evaluates the Uniform(minSupport,maxSupport) CDF for the given input
 double evaluateAsDouble(Double input)
          Evaluates the scalar function as a double.
 UniformDistribution.CDF getCDF()
          Gets the CDF of a scalar distribution.
 UniformDistribution.PDF getDerivative()
          Gets the closed-form derivative of the function.
 Double inverse(double probability)
          Computes the inverse of the CDF for the given probability.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.UniformDistribution
convertFromVector, convertToVector, getEstimator, getMaxSupport, getMean, getMinSupport, getProbabilityFunction, getVariance, sample, setMaxSupport, setMinSupport
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractDistribution
sample
 
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.SmoothUnivariateDistribution
getMean, getProbabilityFunction
 
Methods inherited from interface gov.sandia.cognition.statistics.UnivariateDistribution
getMaxSupport, getMinSupport, getVariance
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample, sample
 
Methods inherited from interface gov.sandia.cognition.math.matrix.Vectorizable
convertFromVector, convertToVector
 

Constructor Detail

UniformDistribution.CDF

public UniformDistribution.CDF()
Creates a new instance of CDF


UniformDistribution.CDF

public UniformDistribution.CDF(double minSupport,
                               double maxSupport)
Creates a new instance of CDF

Parameters:
minSupport - Minimum x bound on the distribution
maxSupport - Maximum bound on the distribution

UniformDistribution.CDF

public UniformDistribution.CDF(UniformDistribution other)
Copy constructor

Parameters:
other - UniformDistribution to copy
Method Detail

clone

public UniformDistribution.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 Vectorizable
Specified by:
clone in interface CloneableSerializable
Overrides:
clone in class UniformDistribution
Returns:
A clone of this object.

evaluate

public double evaluate(double input)
Description copied from interface: UnivariateScalarFunction
Produces a double output for the given double input

Specified by:
evaluate in interface UnivariateScalarFunction
Parameters:
input - Input to the Evaluator
Returns:
output at the given input

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.

evaluateAsDouble

public double evaluateAsDouble(Double input)
Description copied from interface: ScalarFunction
Evaluates the scalar function as a double.

Specified by:
evaluateAsDouble in interface ScalarFunction<Double>
Parameters:
input - The input value.
Returns:
The scalar output calculated from the given input.

evaluate

public static double evaluate(double input,
                              double minSupport,
                              double maxSupport)
Evaluates the Uniform(minSupport,maxSupport) CDF for the given input

Parameters:
minSupport - Minimum x bound on the distribution
maxSupport - Maximum x bound on the distribution
input - Input to evaluate the CDF at
Returns:
Uniform(minSupport,maxSupport) CDF evaluated at input

getCDF

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

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

getDerivative

public UniformDistribution.PDF getDerivative()
Description copied from interface: ClosedFormDifferentiableEvaluator
Gets the closed-form derivative of the function.

Specified by:
getDerivative in interface ClosedFormDifferentiableEvaluator<Double,Double,Double>
Specified by:
getDerivative in interface SmoothCumulativeDistributionFunction
Returns:
Closed-form derivative of the function.

differentiate

public Double differentiate(Double input)
Description copied from interface: DifferentiableEvaluator
Differentiates the output with respect to the input

Specified by:
differentiate in interface DifferentiableEvaluator<Double,Double,Double>
Parameters:
input - Input about which to compute the derivative
Returns:
Derivative of the output with respect to the given input

inverse

public Double inverse(double probability)
Description copied from interface: InvertibleCumulativeDistributionFunction
Computes the inverse of the CDF for the given probability. That is, compute the value "x" such that p=CDF(x).

Specified by:
inverse in interface InvertibleCumulativeDistributionFunction<Double>
Parameters:
probability - Probability to invert.
Returns:
Inverse of the CDF for the given probability.