26package umontreal.ssj.randvar;
28import umontreal.ssj.rng.*;
29import umontreal.ssj.probdist.*;
78 this(s, s, alpha, lambda);
90 setParams(dist.getAlpha(), dist.getLambda());
91 beta = 1.0 / dist.getLambda();
112 return rejectionLogLogistic(stream, auxStream, alpha, beta, gamma, aa, bb, cc);
124 aa = (alpha > 1.0) ? Math.sqrt(alpha + alpha - 1.0) : alpha;
125 bb = alpha - 1.386294361;
128 return rejectionLogLogistic(s, aux, alpha, 1.0 / lambda, 0.0, aa, bb, cc);
139 double gamma,
double aa,
double bb,
double cc) {
142 double u1, u2, v, r, z;
148 v = Math.log(u1 / (1.0 - u1)) / aa;
149 X = alpha * Math.exp(v);
152 if (r + 2.504077397 >= 4.5 * z)
154 if (r >= Math.log(z))
158 return gamma + beta * X;
161 private void init() {
163 aa = (alpha > 1.0) ? Math.sqrt(alpha + alpha - 1.0) : alpha;
164 bb = alpha - 1.386294361;
Extends the class ContinuousDistribution for the gamma distribution tjoh95a (page 337) with shape pa...
GammaGen(RandomStream s, double alpha, double lambda)
Creates a gamma random variate generator with parameters.
void setParams(double alpha, double lambda)
Sets the parameter and of this object.
double nextDouble()
Generates a random number from the continuous distribution contained in this object.
GammaRejectionLoglogisticGen(RandomStream s, RandomStream aux, GammaDist dist)
Creates a new generator object for the gamma distribution dist, using main stream s and auxiliary str...
GammaRejectionLoglogisticGen(RandomStream s, RandomStream aux, double alpha, double lambda)
Creates a gamma random variate generator with parameters.
RandomStream getAuxStream()
Returns the auxiliary stream associated with this object.
GammaRejectionLoglogisticGen(RandomStream s, double alpha, double lambda)
Creates a gamma random variate generator with parameters.
static double nextDouble(RandomStream s, double alpha, double lambda)
Same as nextDouble(s, s, alpha, lambda).
GammaRejectionLoglogisticGen(RandomStream s, GammaDist dist)
Creates a new generator object for the gamma distribution dist and stream s for both the main and aux...
static double nextDouble(RandomStream s, RandomStream aux, double alpha, double lambda)
Generates a new gamma variate with parameters  alpha and  lambda, using main stream s and auxiliary...
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,...