public class GammaGen extends RandomVariateGen
The (non-static) nextDouble method simply calls inverseF on the distribution.
| Constructor and Description |
|---|
GammaGen(RandomStream s,
double alpha)
Creates a gamma random variate generator with parameters
α = alpha and
λ = 1, using stream s.
|
GammaGen(RandomStream s,
double alpha,
double lambda)
Creates a gamma random variate generator with parameters
α = alpha and λ = lambda,
using stream s.
|
GammaGen(RandomStream s,
GammaDist dist)
Creates a new generator object for the gamma
distribution dist and stream s.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getAlpha()
Returns the parameter α of this object.
|
double |
getLambda()
Returns the parameter λ of this object.
|
static double |
nextDouble(RandomStream s,
double alpha,
double lambda)
Generates a new gamma random variate
with parameters α = alpha and λ = lambda,
using stream s.
|
getDistribution, getStream, nextArrayOfDouble, nextDouble, setStreampublic GammaGen(RandomStream s, double alpha, double lambda)
public GammaGen(RandomStream s, double alpha)
public GammaGen(RandomStream s, GammaDist dist)
public static double nextDouble(RandomStream s, double alpha, double lambda)
public double getAlpha()
public double getLambda()
To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.