umontreal.iro.lecuyer.randvar
Class NormalInverseGaussianIGGen
- java.lang.Object
-
- umontreal.iro.lecuyer.randvar.RandomVariateGen
-
- umontreal.iro.lecuyer.randvar.NormalInverseGaussianGen
-
- umontreal.iro.lecuyer.randvar.NormalInverseGaussianIGGen
-
public class NormalInverseGaussianIGGen extends NormalInverseGaussianGen
. This class implements a (NIG) random variate generator by using a normal generator (N) and an inverse gaussian generator (IG), as described in the following
The normal N(μ, σ2) has mean μ and variance σ2, while the inverse gaussian has the parametrization described inInverseGaussianGen. If γ = (α^2 - β^2)1/2 with 0 <= | β| < α and δ > 0, then X∼NIG(α, β, μ, δ).
-
-
Constructor Summary
Constructors Constructor and Description NormalInverseGaussianIGGen(InverseGaussianGen ig, NormalGen ng, double beta, double mu)Creates a random variate generator with parameters α, β = beta, μ = mu and δ, using generators ig and ng, as described above.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublenextDouble()Generates a random number from the continuous distribution contained in this object.static doublenextDouble(InverseGaussianGen ig, NormalGen ng, double beta, double mu)Generates a new variate from the distribution with parameters α, β = beta, μ = mu and δ, using generators ig and ng, as described in eq..-
Methods inherited from class umontreal.iro.lecuyer.randvar.NormalInverseGaussianGen
getAlpha, getBeta, getDelta, getMu, nextDouble, setParams
-
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
getDistribution, getStream, nextArrayOfDouble, setStream, toString
-
-
-
-
Constructor Detail
-
NormalInverseGaussianIGGen
public NormalInverseGaussianIGGen(InverseGaussianGen ig, NormalGen ng, double beta, double mu)
Creates a random variate generator with parameters α, β = beta, μ = mu and δ, using generators ig and ng, as described above. The parameters α and δ are included in generator ig.
-
-
Method Detail
-
nextDouble
public static double nextDouble(InverseGaussianGen ig, NormalGen ng, double beta, double mu)
Generates a new variate from the distribution with parameters α, β = beta, μ = mu and δ, using generators ig and ng, as described in eq.. The parameters α and δ are included in generator ig.
-
nextDouble
public double nextDouble()
Description copied from class:RandomVariateGenGenerates a random number from the continuous distribution contained in this object. By default, this method uses inversion by calling theinverseFmethod of the distribution object. Alternative generating methods are provided in subclasses.- Overrides:
nextDoublein classRandomVariateGen- Returns:
- the generated value
-
-
DMelt 3.0 © DataMelt by jWork.ORG