

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
public interface IntegerDistribution
Interface for distributions on the integers.
Method Summary  

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. whether all integers between the lower and upper bound of the support are included in the support. 
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. 
Method Detail 

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 evaluated
x
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 evaluated
x
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 bound
x0
and x1
,
excluding the lower and including the upper endpoint
NumberIsTooLargeException
 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 probability
p
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 generate
NotStrictlyPositiveException
 if sampleSize
is not positive


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 