Class LogNormalSampler
java.lang.Object
org.apache.commons.rng.sampling.distribution.LogNormalSampler
- All Implemented Interfaces:
ContinuousSampler
public class LogNormalSampler extends java.lang.Object implements ContinuousSampler
Sampling from a log-normal distribution.
- Since:
- 1.1
-
Constructor Summary
Constructors Constructor Description LogNormalSampler(NormalizedGaussianSampler gaussian, double scale, double shape) -
Method Summary
-
Constructor Details
-
LogNormalSampler
- Parameters:
gaussian- N(0,1) generator.scale- Scale of the log-normal distribution.shape- Shape of the log-normal distribution.- Throws:
java.lang.IllegalArgumentException- ifscale < 0orshape <= 0.
-
-
Method Details
-
sample
public double sample()Creates a sample.- Specified by:
samplein interfaceContinuousSampler- Returns:
- a sample.
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-