umontreal.iro.lecuyer.randvar
Class LognormalSpecialGen
- java.lang.Object
-
- umontreal.iro.lecuyer.randvar.RandomVariateGen
-
- umontreal.iro.lecuyer.randvar.LognormalSpecialGen
-
public class LognormalSpecialGen extends RandomVariateGen
Implements methods for generating random variates from the lognormal distribution using an arbitrary normal random variate generator. The (non-static) nextDouble method calls the nextDouble method of the normal generator and takes the exponential of the result.
-
-
Constructor Summary
Constructors Constructor and Description LognormalSpecialGen(NormalGen g)Create a lognormal random variate generator using the normal generator g and with the same parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublenextDouble()Generates a random number from the continuous distribution contained in this object.-
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
getDistribution, getStream, nextArrayOfDouble, setStream, toString
-
-
-
-
Constructor Detail
-
LognormalSpecialGen
public LognormalSpecialGen(NormalGen g)
Create a lognormal random variate generator using the normal generator g and with the same parameters.
-
-
Method Detail
-
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