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 doublenextDouble()Get the next randomdouble.voidseed(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:SeedableSeed the random number/vector/scenario generator to produce repeatable experiments.
-
nextDouble
public double nextDouble()
Description copied from interface:RandomNumberGeneratorGet the next randomdouble.- Specified by:
nextDoublein interfaceRandomNumberGenerator- Returns:
- the next random number
-
-