Class LogNormal
java.lang.Object
eduni.distributions.Generator
eduni.distributions.Normal
eduni.distributions.LogNormal
- All Implemented Interfaces:
ContinuousGenerator, Seedable
A random number generator based on the lognormal distribution.
- Version:
- 1.0, 2 October 2002
- Author:
- F.Mallet from Costas Simatos's original
-
Constructor Details
-
LogNormal
public LogNormal(double mean, double variance) the seed is automatically provided by theSeedGenerator- Parameters:
mean- The mean of the distributionvariance- The variance of the distribution
-
LogNormal
public LogNormal(double mean, double variance, long seed) The constructor with which a specific seed is set for the random number generator- Parameters:
mean- The mean of the distributionvariance- The variance of the distributionseed- The initial seed for the generator, two instances with the same seed will generate the same sequence of numbers
-
-
Method Details
-
sample
public double sample()Generate a new random number.- Specified by:
samplein interfaceContinuousGenerator- Overrides:
samplein classNormal- Returns:
- The next random number in the sequence
-