statistic.distribution
Class GenericDiscreteDistribution

java.lang.Object
  |
  +--statistic.distribution.GenericDistribution
        |
        +--statistic.distribution.GenericDiscreteDistribution
All Implemented Interfaces:
RandomGenerator
Direct Known Subclasses:
ChapeauSigmaDistribution, GeometricDistribution, PoissonDistribution, ServiceTimeDistribution, SigmaDistribution

public abstract class GenericDiscreteDistribution
extends GenericDistribution
implements RandomGenerator

Author:
mladoue

Field Summary
 boolean cdf
           
 
Fields inherited from class statistic.distribution.GenericDistribution
name, paramNames, params
 
Fields inherited from interface statistic.RandomGenerator
random
 
Constructor Summary
GenericDiscreteDistribution()
           
 
Method Summary
 double cdf(double x)
          Method cdf Returns the value of the cumulative distribution function at x where x is a double It's defined for compatibility problems
abstract  double cdf(int x)
          Returns the value of the cumulative distribution function at x where x is an int
 double getFMAX()
          Method getFMAX: For some Discrete Distribution we could have a pb to generate a randInt because of the cdf value So when we generate random value we verify that this value is < getFMAX()
 boolean getInitialisationStatus()
           
 int getKMAX(int x)
          Method getKMAX.
abstract  double getSumCdf(int k)
           
 double pdf(double x)
          Retourne la valeur de la pdf(x) where x is a double
 double rand()
          Method rand : to generate a random double(compatibility with GenericDistribution) value
 int randInt()
          Method randInt.
 int randIntFast()
          Method randIntFast.
 void setInitialisationStatus(boolean cdf)
           
 
Methods inherited from class statistic.distribution.GenericDistribution
getEquation, getName, getParam, getParamName, getParams, getParamsCount, getParamsNames, mean, normalStandardCdf, setParam, setParams, var
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cdf

public boolean cdf
Constructor Detail

GenericDiscreteDistribution

public GenericDiscreteDistribution()
Method Detail

cdf

public abstract double cdf(int x)
Returns the value of the cumulative distribution function at x where x is an int


pdf

public double pdf(double x)
Retourne la valeur de la pdf(x) where x is a double

Specified by:
pdf in class GenericDistribution

cdf

public double cdf(double x)
Method cdf Returns the value of the cumulative distribution function at x where x is a double It's defined for compatibility problems

Specified by:
cdf in class GenericDistribution
Parameters:
x -
Returns:
double

randInt

public int randInt()
            throws java.lang.OutOfMemoryError
Method randInt. Methode a definir dans chaque classe permettant d'obtenir un tirage pour une loi discrete

Returns:
int
Throws:
java.lang.OutOfMemoryError

randIntFast

public int randIntFast()
                throws java.lang.OutOfMemoryError
Method randIntFast. Correct on 01/04/03

Returns:
int
Throws:
java.lang.OutOfMemoryError

getFMAX

public double getFMAX()
Method getFMAX: For some Discrete Distribution we could have a pb to generate a randInt because of the cdf value So when we generate random value we verify that this value is < getFMAX()

Returns:
double

getKMAX

public int getKMAX(int x)
Method getKMAX. randInt is between 1 and KMAX

Parameters:
x - we could have a more or less big KMAX (il changes the iteration number)
Returns:
int

rand

public double rand()
Method rand : to generate a random double(compatibility with GenericDistribution) value

Overrides:
rand in class GenericDistribution
Returns:
a double value

getInitialisationStatus

public boolean getInitialisationStatus()

setInitialisationStatus

public void setInitialisationStatus(boolean cdf)

getSumCdf

public abstract double getSumCdf(int k)