public static class BernoulliDistribution.CDF extends BernoulliDistribution implements ClosedFormCumulativeDistributionFunction<java.lang.Number>
BernoulliDistribution.CDF, BernoulliDistribution.PMF
DEFAULT_P
Constructor and Description |
---|
CDF()
Default constructor
|
CDF(BernoulliDistribution other)
Copy constructor
|
CDF(double p)
Creates a new instance of PMF
|
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
evaluate(java.lang.Number input)
Evaluates the function on the given input and returns the output.
|
BernoulliDistribution.CDF |
getCDF()
Gets the CDF of a scalar distribution.
|
convertFromVector, convertToVector, getDomain, getDomainSize, getMaxSupport, getMean, getMeanAsDouble, getMinSupport, getP, getProbabilityFunction, getVariance, sampleAsBoolean, sampleAsInt, sampleInto, setP, toString
sampleAsInts, sampleInto
clone
sample, sample
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clone, convertFromVector, convertToVector
getMaxSupport, getMeanAsDouble, getMinSupport, getVariance
getMean
sample, sample, sampleInto
public CDF()
public CDF(double p)
p
- Bernoulli parameter, where the distribution takes value "1" with
probability "p" and value "0" with probability 1-p.public CDF(BernoulliDistribution other)
other
- BernoulliDistribution to copypublic java.lang.Double evaluate(java.lang.Number input)
Evaluator
public BernoulliDistribution.CDF getCDF()
UnivariateDistribution
getCDF
in interface ClosedFormUnivariateDistribution<java.lang.Number>
getCDF
in interface UnivariateDistribution<java.lang.Number>
getCDF
in class BernoulliDistribution