gov.sandia.cognition.statistics.distribution
Class BernoulliDistribution.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<Number>
              extended by gov.sandia.cognition.statistics.distribution.BernoulliDistribution
                  extended by gov.sandia.cognition.statistics.distribution.BernoulliDistribution.CDF
All Implemented Interfaces:
Evaluator<Number,Double>, Vectorizable, ClosedFormComputableDistribution<Number>, ClosedFormCumulativeDistributionFunction<Number>, ClosedFormDiscreteUnivariateDistribution<Number>, ClosedFormDistribution<Number>, ClosedFormUnivariateDistribution<Number>, ComputableDistribution<Number>, CumulativeDistributionFunction<Number>, DiscreteDistribution<Number>, Distribution<Number>, DistributionWithMean<Number>, UnivariateDistribution<Number>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
BernoulliDistribution

public static class BernoulliDistribution.CDF
extends BernoulliDistribution
implements ClosedFormCumulativeDistributionFunction<Number>

CDF of a Bernoulli distribution.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.BernoulliDistribution
BernoulliDistribution.CDF, BernoulliDistribution.PMF
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.distribution.BernoulliDistribution
DEFAULT_P
 
Constructor Summary
BernoulliDistribution.CDF()
          Default constructor
BernoulliDistribution.CDF(BernoulliDistribution other)
          Copy constructor
BernoulliDistribution.CDF(double p)
          Creates a new instance of PMF
 
Method Summary
 Double evaluate(Number input)
          Evaluates the function on the given input and returns the output.
 BernoulliDistribution.CDF getCDF()
          Gets the CDF of a scalar distribution.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.BernoulliDistribution
convertFromVector, convertToVector, getDomain, getDomainSize, getMaxSupport, getMean, getMinSupport, getP, getProbabilityFunction, getVariance, sample, setP, toString
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractClosedFormUnivariateDistribution
clone
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractDistribution
sample
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.math.matrix.Vectorizable
clone, convertFromVector, convertToVector
 
Methods inherited from interface gov.sandia.cognition.statistics.UnivariateDistribution
getMaxSupport, getMinSupport, getVariance
 
Methods inherited from interface gov.sandia.cognition.statistics.DistributionWithMean
getMean
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample, sample
 

Constructor Detail

BernoulliDistribution.CDF

public BernoulliDistribution.CDF()
Default constructor


BernoulliDistribution.CDF

public BernoulliDistribution.CDF(double p)
Creates a new instance of PMF

Parameters:
p - Bernoulli parameter, where the distribution takes value "1" with probability "p" and value "0" with probability 1-p.

BernoulliDistribution.CDF

public BernoulliDistribution.CDF(BernoulliDistribution other)
Copy constructor

Parameters:
other - BernoulliDistribution to copy
Method Detail

evaluate

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

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

getCDF

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

Specified by:
getCDF in interface ClosedFormUnivariateDistribution<Number>
Specified by:
getCDF in interface UnivariateDistribution<Number>
Overrides:
getCDF in class BernoulliDistribution
Returns:
CDF of the scalar distribution.