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
Y |
∼ |
IG(δ/γ, δ2) |
|
X | (Y = y) |
∼ |
N(μ + βy, y). |
|
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(α, β, μ, δ).
Method Summary |
double |
nextDouble()
Generates a random number from the continuous distribution
contained in this object. |
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.. |
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.
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:
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
jHepWork 3.1 ©