umontreal.iro.lecuyer.randvar
Class GumbelGen
- java.lang.Object
-
- umontreal.iro.lecuyer.randvar.RandomVariateGen
-
- umontreal.iro.lecuyer.randvar.GumbelGen
-
public class GumbelGen extends RandomVariateGen
This class implements methods for generating random variates from the Gumbel distribution. Its density is given byf (x) = e-ze-e-z/| β|, for - ∞ < x < ∞.where we use the notation z = (x - δ)/β. The scale parameter β can be positive (for the Gumbel distribution) or negative (for the reverse Gumbel distribution), but not 0.
-
-
Constructor Summary
Constructors Constructor and Description GumbelGen(RandomStream s)Creates a Gumbel random number generator with β = 1 and δ = 0 using stream s.GumbelGen(RandomStream s, double beta, double delta)Creates a Gumbel random number generator with parameters β = beta and δ = delta using stream s.GumbelGen(RandomStream s, GumbelDist dist)Creates a new generator for the Gumbel distribution dist and stream s.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublegetBeta()Returns the parameter β.doublegetDelta()Returns the parameter δ.static doublenextDouble(RandomStream s, double beta, double delta)Generates a new variate from the Gumbel distribution with parameters β = beta and δ = delta using stream s.-
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
getDistribution, getStream, nextArrayOfDouble, nextDouble, setStream, toString
-
-
-
-
Constructor Detail
-
GumbelGen
public GumbelGen(RandomStream s)
Creates a Gumbel random number generator with β = 1 and δ = 0 using stream s.
-
GumbelGen
public GumbelGen(RandomStream s, double beta, double delta)
Creates a Gumbel random number generator with parameters β = beta and δ = delta using stream s.
-
GumbelGen
public GumbelGen(RandomStream s, GumbelDist dist)
Creates a new generator for the Gumbel distribution dist and stream s.
-
-
Method Detail
-
nextDouble
public static double nextDouble(RandomStream s, double beta, double delta)
Generates a new variate from the Gumbel distribution with parameters β = beta and δ = delta using stream s.
-
getBeta
public double getBeta()
Returns the parameter β.
-
getDelta
public double getDelta()
Returns the parameter δ.
-
-
DMelt 3.0 © DataMelt by jWork.ORG