org.apache.commons.math3.distribution
public interface IntegerDistribution
Modifier and Type  Method and Description 

double 
cumulativeProbability(int x)
For a random variable
X whose values are distributed according
to this distribution, this method returns P(X <= x) . 
double 
cumulativeProbability(int x0,
int x1)
For a random variable
X whose values are distributed according
to this distribution, this method returns P(x0 < X <= x1) . 
double 
getNumericalMean()
Use this method to get the numerical value of the mean of this
distribution.

double 
getNumericalVariance()
Use this method to get the numerical value of the variance of this
distribution.

int 
getSupportLowerBound()
Access the lower bound of the support.

int 
getSupportUpperBound()
Access the upper bound of the support.

int 
inverseCumulativeProbability(double p)
Computes the quantile function of this distribution.

boolean 
isSupportConnected()
Use this method to get information about whether the support is
connected, i.e.

double 
probability(int x)
For a random variable
X whose values are distributed according
to this distribution, this method returns P(X = x) . 
void 
reseedRandomGenerator(long seed)
Reseed the random generator used to generate samples.

int 
sample()
Generate a random value sampled from this distribution.

int[] 
sample(int sampleSize)
Generate a random sample from the distribution.

double probability(int x)
X
whose values are distributed according
to this distribution, this method returns P(X = x)
. In other
words, this method represents the probability mass function (PMF)
for the distribution.x
 the point at which the PMF is evaluatedx
double cumulativeProbability(int x)
X
whose values are distributed according
to this distribution, this method returns P(X <= x)
. In other
words, this method represents the (cumulative) distribution function
(CDF) for this distribution.x
 the point at which the CDF is evaluatedx
double cumulativeProbability(int x0, int x1) throws NumberIsTooLargeException
X
whose values are distributed according
to this distribution, this method returns P(x0 < X <= x1)
.x0
 the exclusive lower boundx1
 the inclusive upper boundx0
and x1
,
excluding the lower and including the upper endpointNumberIsTooLargeException
 if x0 > x1
int inverseCumulativeProbability(double p) throws OutOfRangeException
X
distributed according to this distribution,
the returned value is
inf{x in Z  P(X<=x) >= p}
for 0 < p <= 1
,inf{x in Z  P(X<=x) > 0}
for p = 0
.int
,
then Integer.MIN_VALUE
or Integer.MAX_VALUE
is returned.p
 the cumulative probabilityp
quantile of this distribution
(largest 0quantile for p = 0
)OutOfRangeException
 if p < 0
or p > 1
double getNumericalMean()
Double.NaN
if it is not defineddouble getNumericalVariance()
Double.POSITIVE_INFINITY
or
Double.NaN
if it is not defined)int getSupportLowerBound()
inverseCumulativeProbability(0)
. In other words, this
method must return
inf {x in Z  P(X <= x) > 0}
.
Integer.MIN_VALUE
for negative infinity)int getSupportUpperBound()
inverseCumulativeProbability(1)
. In other words, this
method must return
inf {x in R  P(X <= x) = 1}
.
Integer.MAX_VALUE
for positive infinity)boolean isSupportConnected()
void reseedRandomGenerator(long seed)
seed
 the new seedint sample()
int[] sample(int sampleSize)
sampleSize
 the number of random values to generateNotStrictlyPositiveException
 if sampleSize
is not positiveCopyright © 2003–2015 The Apache Software Foundation. All rights reserved.