umontreal.iro.lecuyer.randvar
Class InverseGaussianGen
- java.lang.Object
-
- umontreal.iro.lecuyer.randvar.RandomVariateGen
-
- 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 isf (x) = (λ)1/2/(2πx3) e-λ(x-μ)2/(2μ2x) for x > 0.
-
-
Constructor Summary
Constructors Constructor and Description 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetLambda()Returns the parameter λ of this object.doublegetMu()Returns the parameter μ of this object.static doublenextDouble(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
-
-
-
-
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.
-
-
DMelt 3.0 © DataMelt by jWork.ORG