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 |
LognormalSpecialGen(NormalGen g)
Create a lognormal random variate generator
using the normal generator g and with the same parameters. |
Method Summary |
double |
nextDouble()
Generates a random number from the continuous distribution
contained in this object. |
LognormalSpecialGen
public LognormalSpecialGen(NormalGen g)
- Create a lognormal random variate generator
using the normal generator g and with the same parameters.
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
To submit a bug or ask questions, send an e-mail to
Pierre L'Ecuyer.