SSJ  3.3.1
Stochastic Simulation in Java
Public Member Functions | List of all members

Represents a constant discrete distribution taking a single integer value with probability 1. More...

Inheritance diagram for ConstantIntDist:
[legend]
Collaboration diagram for ConstantIntDist:
[legend]

Public Member Functions

 ConstantIntDist (int c)
 Constructs a new constant distribution with probability 1 at c.
 
String toString ()
 Returns a String containing information about the current distribution.
 
- Public Member Functions inherited from UniformIntDist
 UniformIntDist (int i, int j)
 Constructs a discrete uniform distribution over the interval \([i,j]\).
 
double prob (int x)
 
double cdf (int x)
 
double barF (int x)
 
int inverseFInt (double u)
 
double getMean ()
 Returns the mean of the distribution function.
 
double getVariance ()
 Returns the variance of the distribution function.
 
double getStandardDeviation ()
 Returns the standard deviation of the distribution function.
 
int getI ()
 Returns the parameter \(i\).
 
int getJ ()
 Returns the parameter \(j\).
 
void setParams (int i, int j)
 Sets the parameters \(i\) and \(j\) for this object.
 
double [] getParams ()
 Return a table containing the parameters of the current distribution. More...
 
String toString ()
 Returns a String containing information about the current distribution.
 
- Public Member Functions inherited from DiscreteDistributionInt
abstract double prob (int x)
 Returns \(p(x)\), the probability of \(x\). More...
 
double cdf (double x)
 Returns the distribution function \(F\) evaluated at \(x\) (see ( FDistDisc )). More...
 
abstract double cdf (int x)
 Returns the distribution function \(F\) evaluated at \(x\) (see ( FDistDisc )). More...
 
double barF (double x)
 Returns \(\bar{F}(x)\), the complementary distribution function. More...
 
double barF (int x)
 Returns \(\bar{F}(x)\), the complementary distribution function. More...
 
int getXinf ()
 Returns the lower limit \(x_a\) of the support of the probability mass function. More...
 
int getXsup ()
 Returns the upper limit \(x_b\) of the support of the probability mass function. More...
 
double inverseF (double u)
 Returns the inverse distribution function \(F^{-1}(u)\), where. More...
 
int inverseFInt (double u)
 Returns the inverse distribution function \(F^{-1}(u)\), where. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from UniformIntDist
static double prob (int i, int j, int x)
 Computes the discrete uniform probability \(p(x)\) defined in ( fmassuniformint ).
 
static double cdf (int i, int j, int x)
 Computes the discrete uniform distribution function defined in ( cdfuniformint ).
 
static double barF (int i, int j, int x)
 Computes the discrete uniform complementary distribution function \(\bar{F}(x)\). More...
 
static int inverseF (int i, int j, double u)
 Computes the inverse of the discrete uniform distribution function ( invuniformint ).
 
static double [] getMLE (int[] x, int n)
 Estimates the parameters \((i, j)\) of the uniform distribution over integers using the maximum likelihood method, from the \(n\) observations \(x[k]\), \(k = 0, 1, …, n-1\). More...
 
static UniformIntDist getInstanceFromMLE (int[] x, int n)
 Creates a new instance of a discrete uniform distribution over integers with parameters \(i\) and \(j\) estimated using the maximum likelihood method based on the \(n\) observations \(x[k]\), \(k = 0, 1, …, n-1\). More...
 
static double getMean (int i, int j)
 Computes and returns the mean \(E[X] = (i + j)/2\) of the discrete uniform distribution. More...
 
static double getVariance (int i, int j)
 Computes and returns the variance \(\mbox{Var}[X] = [(j - i + 1)^2 - 1]/{12}\) of the discrete uniform distribution. More...
 
static double getStandardDeviation (int i, int j)
 Computes and returns the standard deviation of the discrete uniform distribution. More...
 
- Static Public Attributes inherited from DiscreteDistributionInt
static double EPSILON = 1.0e-16
 Environment variable that determines what probability terms can be considered as negligible when building precomputed tables for distribution and mass functions. More...
 
- Protected Attributes inherited from UniformIntDist
int i
 
int j
 
- Protected Attributes inherited from DiscreteDistributionInt
double cdf [] = null
 
double pdf [] = null
 
int xmin = 0
 
int xmax = 0
 
int xmed = 0
 
int supportA = Integer.MIN_VALUE
 
int supportB = Integer.MAX_VALUE
 
- Static Protected Attributes inherited from DiscreteDistributionInt
static final double EPS_EXTRA = 1.0e-6
 

Detailed Description

Represents a constant discrete distribution taking a single integer value with probability 1.

Its mass function is

\[ p(x) = \left\{\begin{array}{ll} 1, & \qquad\mbox{for } x = c, \\ 0, & \qquad\mbox{elsewhere. } \end{array}\right. \tag{fconsint} \]

Its distribution function is

\[ F(x) = \left\{\begin{array}{ll} 0, & \qquad\mbox{ for } x < c \\ 1, & \qquad\mbox{ for } x \ge c. \end{array}\right. \tag{cdfconsint} \]


The documentation for this class was generated from the following file: