Class LogNormalRNG
- java.lang.Object
-
- dev.nm.stat.random.rng.univariate.LogNormalRNG
-
- All Implemented Interfaces:
RandomNumberGenerator
,Seedable
public class LogNormalRNG extends Object implements RandomNumberGenerator
This random number generator samples from the log-normal distribution. The R equivalent class aredlnorm, plnorm, qlnorm, rlnorm
.- See Also:
- Wikipedia: Log-normal distribution
-
-
Constructor Summary
Constructors Constructor Description LogNormalRNG(double logMean, double logSigma)
Construct a random number generator to sample from the log-normal distribution.LogNormalRNG(NormalRNG rnorm)
Construct a random number generator to sample from the log-normal distribution.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
nextDouble()
Get the next randomdouble
.void
seed(long... seeds)
Seed the random number/vector/scenario generator to produce repeatable experiments.
-
-
-
Constructor Detail
-
LogNormalRNG
public LogNormalRNG(NormalRNG rnorm)
Construct a random number generator to sample from the log-normal distribution.- Parameters:
rnorm
- a random number generator that samples from the normal distribution
-
LogNormalRNG
public LogNormalRNG(double logMean, double logSigma)
Construct a random number generator to sample from the log-normal distribution.- Parameters:
logMean
- the log of meanlogSigma
- the log of standard deviation
-
-
Method Detail
-
seed
public void seed(long... seeds)
Description copied from interface:Seedable
Seed the random number/vector/scenario generator to produce repeatable experiments.
-
nextDouble
public double nextDouble()
Description copied from interface:RandomNumberGenerator
Get the next randomdouble
.- Specified by:
nextDouble
in interfaceRandomNumberGenerator
- Returns:
- the next random number
-
-