Utility
Class Erlang

java.lang.Object
  |
  +--Utility.RandomNumber
        |
        +--Utility.Erlang

public class Erlang
extends RandomNumber

Erlang is used to generate random variables from the Erlang distribution.

This is a continuous distribution.

Tests Performed
1000 samples were generated and the means and variances were examined. Subjectively, they seemed correct. Goodness of fit tests where not performed.


Constructor Summary
Erlang(double mean, double stdDev)
          Erlang constructor.
 
Method Summary
 double getMean()
           
 double getStdDev()
           
 double getVariance()
           
 double sampleDouble()
          The sampleDouble function returns a random variable that is chosen from a Erlang distribution with parameters as set in the constructor.
 int sampleInt()
          The sampleInt function should not be called for this continuous distribution.
 
Methods inherited from class Utility.RandomNumber
goodnessOfFitTest, goodnessOfFitTest, randomMixer, resetRandomMixer, sample01
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Erlang

public Erlang(double mean,
              double stdDev)
Erlang constructor. Initialize the parameters of the Erlang distribution.

Parameters:
mean - The mean of the distribution
Method Detail

getMean

public double getMean()

getVariance

public double getVariance()

getStdDev

public double getStdDev()

sampleDouble

public double sampleDouble()
The sampleDouble function returns a random variable that is chosen from a Erlang distribution with parameters as set in the constructor.

Overrides:
sampleDouble in class RandomNumber
See Also:
Erlang(double, double)

sampleInt

public int sampleInt()
The sampleInt function should not be called for this continuous distribution.

Overrides:
sampleInt in class RandomNumber