SSJ
V. 2.6.

umontreal.iro.lecuyer.randvar
Class InverseGaussianGen

java.lang.Object
  extended by umontreal.iro.lecuyer.randvar.RandomVariateGen
      extended by umontreal.iro.lecuyer.randvar.InverseGaussianGen
Direct Known Subclasses:
InverseGaussianMSHGen

public class InverseGaussianGen
extends RandomVariateGen

This class implements random variate generators for the inverse Gaussian distribution with location parameter μ > 0 and scale parameter λ > 0. The density function of this distribution is

f (x) = (λ)1/2/(2πx3)  e-λ(x-μ)2/(2μ2x)         for x > 0.


Constructor Summary
InverseGaussianGen(RandomStream s, double mu, double lambda)
          Creates an inverse Gaussian random variate generator with parameters μ = mu and λ = lambda, using stream s.
InverseGaussianGen(RandomStream s, InverseGaussianDist dist)
          Creates a new generator for the distribution dist, using stream s.
 
Method Summary
 double getLambda()
          Returns the parameter λ of this object.
 double getMu()
          Returns the parameter μ of this object.
static double nextDouble(RandomStream s, double mu, double lambda)
          Generates a variate from the inverse gaussian distribution with location parameter μ > 0 and scale parameter λ > 0.
 
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
getDistribution, getStream, nextArrayOfDouble, nextDouble, setStream, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InverseGaussianGen

public InverseGaussianGen(RandomStream s,
                          double mu,
                          double lambda)
Creates an inverse Gaussian random variate generator with parameters μ = mu and λ = lambda, using stream s.


InverseGaussianGen

public InverseGaussianGen(RandomStream s,
                          InverseGaussianDist dist)
Creates a new generator for the distribution dist, using stream s.

Method Detail

nextDouble

public static double nextDouble(RandomStream s,
                                double mu,
                                double lambda)
Generates a variate from the inverse gaussian distribution with location parameter μ > 0 and scale parameter λ > 0.


getMu

public double getMu()
Returns the parameter μ of this object.


getLambda

public double getLambda()
Returns the parameter λ of this object.


SSJ
V. 2.6.

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