SSJ
V. 2.6.2.

umontreal.iro.lecuyer.randvar
Class InverseGaussianMSHGen

java.lang.Object
  extended by umontreal.iro.lecuyer.randvar.RandomVariateGen
      extended by umontreal.iro.lecuyer.randvar.InverseGaussianGen
          extended by umontreal.iro.lecuyer.randvar.InverseGaussianMSHGen

public class InverseGaussianMSHGen
extends InverseGaussianGen

This class implements inverse gaussian random variate generators using the many-to-one transformation method of Michael, Schucany and Haas (MHS).


Constructor Summary
InverseGaussianMSHGen(RandomStream s, NormalGen sn, double mu, double lambda)
          Creates an inverse gaussian random variate generator with parameters μ = mu and λ = lambda, using streams s and sn.
InverseGaussianMSHGen(RandomStream s, NormalGen sn, InverseGaussianDist dist)
          Creates a new generator for the distribution dist using streams s and sn.
 
Method Summary
 double nextDouble()
          Generates a random number from the continuous distribution contained in this object.
static double nextDouble(RandomStream s, NormalGen sn, double mu, double lambda)
          Generates a new variate from the inverse gaussian distribution with parameters μ = mu and λ = lambda, using streams s and sn.
 
Methods inherited from class umontreal.iro.lecuyer.randvar.InverseGaussianGen
getLambda, getMu, nextDouble
 
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

InverseGaussianMSHGen

public InverseGaussianMSHGen(RandomStream s,
                             NormalGen sn,
                             double mu,
                             double lambda)
Creates an inverse gaussian random variate generator with parameters μ = mu and λ = lambda, using streams s and sn.


InverseGaussianMSHGen

public InverseGaussianMSHGen(RandomStream s,
                             NormalGen sn,
                             InverseGaussianDist dist)
Creates a new generator for the distribution dist using streams s and sn.

Method Detail

nextDouble

public static double nextDouble(RandomStream s,
                                NormalGen sn,
                                double mu,
                                double lambda)
Generates a new variate from the inverse gaussian distribution with parameters μ = mu and λ = lambda, using streams s and sn.


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

SSJ
V. 2.6.2.

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