Class LogNormalRNG
java.lang.Object
dev.nm.stat.random.rng.univariate.LogNormalRNG
- All Implemented Interfaces:
RandomNumberGenerator
,Seedable
This random number generator samples from the log-normal distribution.
The R equivalent class are
dlnorm, plnorm, qlnorm, rlnorm
.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionLogNormalRNG
(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
Modifier and TypeMethodDescriptiondouble
Get the next randomdouble
.void
seed
(long... seeds) Seed the random number/vector/scenario generator to produce repeatable experiments.
-
Constructor Details
-
LogNormalRNG
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 Details
-
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
-