SSJ
V. 2.6.2.

umontreal.iro.lecuyer.randvar
Class GammaRejectionLoglogisticGen

java.lang.Object
  extended by umontreal.iro.lecuyer.randvar.RandomVariateGen
      extended by umontreal.iro.lecuyer.randvar.GammaGen
          extended by umontreal.iro.lecuyer.randvar.GammaRejectionLoglogisticGen

public class GammaRejectionLoglogisticGen
extends GammaGen

This class implements gamma random variate generators using a rejection method with loglogistic envelopes,. For each gamma variate, the first two uniforms are taken from the main stream and all additional uniforms (after the first rejection) are obtained from the auxiliary stream.


Constructor Summary
GammaRejectionLoglogisticGen(RandomStream s, double alpha, double lambda)
          Creates a gamma random variate generator with parameters α = alpha and λ = lambda, using stream s.
GammaRejectionLoglogisticGen(RandomStream s, GammaDist dist)
          Creates a new generator object for the gamma distribution dist and stream s for both the main and auxiliary stream.
GammaRejectionLoglogisticGen(RandomStream s, RandomStream aux, double alpha, double lambda)
          Creates a gamma random variate generator with parameters α = alpha and λ = lambda, using main stream s and auxiliary stream aux.
GammaRejectionLoglogisticGen(RandomStream s, RandomStream aux, GammaDist dist)
          Creates a new generator object for the gamma distribution dist, using main stream s and auxiliary stream aux.
 
Method Summary
 RandomStream getAuxStream()
          Returns the auxiliary stream associated with this object.
 double nextDouble()
          Generates a random number from the continuous distribution contained in this object.
static double nextDouble(RandomStream s, double alpha, double lambda)
          Same as nextDouble (s, s, alpha, lambda).
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 stream aux.
 
Methods inherited from class umontreal.iro.lecuyer.randvar.GammaGen
getAlpha, getLambda
 
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
getDistribution, getStream, nextArrayOfDouble, setStream, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GammaRejectionLoglogisticGen

public GammaRejectionLoglogisticGen(RandomStream s,
                                    RandomStream aux,
                                    double alpha,
                                    double lambda)
Creates a gamma random variate generator with parameters α = alpha and λ = lambda, using main stream s and auxiliary stream aux. The auxiliary stream is used when a random number of uniforms is required for a rejection-type generation method.


GammaRejectionLoglogisticGen

public GammaRejectionLoglogisticGen(RandomStream s,
                                    double alpha,
                                    double lambda)
Creates a gamma random variate generator with parameters α = alpha and λ = lambda, using stream s.


GammaRejectionLoglogisticGen

public GammaRejectionLoglogisticGen(RandomStream s,
                                    RandomStream aux,
                                    GammaDist dist)
Creates a new generator object for the gamma distribution dist, using main stream s and auxiliary stream aux. The auxiliary stream is used when a random number of uniforms is required for a rejection-type generation method.


GammaRejectionLoglogisticGen

public GammaRejectionLoglogisticGen(RandomStream s,
                                    GammaDist dist)
Creates a new generator object for the gamma distribution dist and stream s for both the main and auxiliary stream.

Method Detail

getAuxStream

public RandomStream getAuxStream()
Returns the auxiliary stream associated with this object.


nextDouble

public double nextDouble()
Description copied from class: RandomVariateGen
Generates a random number from the continuous distribution contained in this object. By default, this method uses inversion by calling the inverseF method of the distribution object. Alternative generating methods are provided in subclasses.

Overrides:
nextDouble in class RandomVariateGen
Returns:
the generated value

nextDouble

public 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 stream aux.


nextDouble

public static double nextDouble(RandomStream s,
                                double alpha,
                                double lambda)
Same as nextDouble (s, s, alpha, lambda).


SSJ
V. 2.6.2.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.