SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.randvar.LognormalSpecialGen Class Reference

Implements methods for generating random variates from the lognormal distribution using an arbitrary normal random variate generator. More...

Inheritance diagram for umontreal.ssj.randvar.LognormalSpecialGen:
umontreal.ssj.randvar.RandomVariateGen

Public Member Functions

 LognormalSpecialGen (NormalGen g)
 Create a lognormal random variate generator using the normal generator g and with the same parameters.
double nextDouble ()
 Generates a random number from the continuous distribution contained in this object.
Public Member Functions inherited from umontreal.ssj.randvar.RandomVariateGen
 RandomVariateGen (RandomStream s, Distribution dist)
 Creates a new random variate generator from the distribution dist, using stream s.
void nextArrayOfDouble (double[] v, int start, int n)
 Generates n random numbers from the continuous distribution contained in this object.
double[] nextArrayOfDouble (int n)
 Generates n random numbers from the continuous distribution contained in this object, and returns them in a new array of size n.
RandomStream getStream ()
 Returns the umontreal.ssj.rng.RandomStream used by this generator.
void setStream (RandomStream stream)
 Sets the umontreal.ssj.rng.RandomStream used by this generator to stream.
Distribution getDistribution ()
 Returns the umontreal.ssj.probdist.Distribution used by this generator.
String toString ()
 Returns a String containing information about the current generator.

Detailed Description

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.

Definition at line 37 of file LognormalSpecialGen.java.

Constructor & Destructor Documentation

◆ LognormalSpecialGen()

umontreal.ssj.randvar.LognormalSpecialGen.LognormalSpecialGen ( NormalGen g)

Create a lognormal random variate generator using the normal generator g and with the same parameters.

Definition at line 45 of file LognormalSpecialGen.java.

Member Function Documentation

◆ nextDouble()

double umontreal.ssj.randvar.LognormalSpecialGen.nextDouble ( )

Generates a random number from the continuous distribution contained in this object.

By default, this method uses inversion by calling the umontreal.ssj.probdist.ContinuousDistribution.inverseF method of the distribution object. Alternative generating methods are provided in subclasses.

Returns
the generated value

Reimplemented from umontreal.ssj.randvar.RandomVariateGen.

Definition at line 52 of file LognormalSpecialGen.java.


The documentation for this class was generated from the following file: