25package umontreal.ssj.randvar;
27import umontreal.ssj.rng.*;
28import umontreal.ssj.probdist.*;
47public class GammaGen extends RandomVariateGen {
48 protected double alpha = -1.0;
49 protected double lambda = -1.0;
77 setParams(dist.getAlpha(), dist.getLambda());
108 throw new IllegalArgumentException(
"lambda <= 0");
110 throw new IllegalArgumentException(
"alpha <= 0");
111 this.lambda = lambda;
Extends the class ContinuousDistribution for the gamma distribution tjoh95a (page 337) with shape pa...
double inverseF(double u)
Returns the inverse distribution function .
GammaGen(RandomStream s, double alpha, double lambda)
Creates a gamma random variate generator with parameters.
double getLambda()
Returns the parameter of this object.
void setParams(double alpha, double lambda)
Sets the parameter and of this object.
double getAlpha()
Returns the parameter of this object.
GammaGen(RandomStream s, GammaDist dist)
Creates a new generator object for the gamma distribution dist and stream s.
static double nextDouble(RandomStream s, double alpha, double lambda)
Generates a new gamma random variate with parameters  alpha and  lambda, using stream s.
GammaGen(RandomStream s, double alpha)
Creates a gamma random variate generator with parameters.
This interface defines the basic structures to handle multiple streams of uniform (pseudo)random numb...
double nextDouble()
Returns a (pseudo)random number from the uniform distribution over the interval , using this stream,...