jsim.variate
Class Gamma

java.lang.Object
  extended by jsim.variate.Variate
      extended by jsim.variate.Gamma

public class Gamma
extends Variate

Gamma random variate generation.


Constructor Summary
Gamma(double beta, double alpha, int i)
          Constructs a Gamma random variate where mean = alpha * beta and variance = alpha * beta ^ 2.
 
Method Summary
 double gen()
          Generates a random number from the Gamma distribution
 java.lang.Double[] getParameters()
          Get the parameters of the constuctor
 
Methods inherited from class jsim.variate.Variate
incStream, printName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Gamma

public Gamma(double beta,
             double alpha,
             int i)
Constructs a Gamma random variate where mean = alpha * beta and variance = alpha * beta ^ 2.

Parameters:
beta - scale parameter (is this backwards?)
alpha - shape parameter
i - random number stream
Method Detail

getParameters

public java.lang.Double[] getParameters()
Get the parameters of the constuctor

Overrides:
getParameters in class Variate

gen

public double gen()
Generates a random number from the Gamma distribution

Overrides:
gen in class Variate
Returns:
double