Class BoxMullerGaussianSampler
- java.lang.Object
-
- org.apache.commons.rng.sampling.distribution.SamplerBase
-
- org.apache.commons.rng.sampling.distribution.BoxMullerGaussianSampler
-
- All Implemented Interfaces:
ContinuousSampler
@Deprecated public class BoxMullerGaussianSampler extends SamplerBase implements ContinuousSampler
Deprecated.Since version 1.1. Please useBoxMullerNormalizedGaussianSampler
andGaussianSampler
instead.Box-Muller algorithm for sampling from a Gaussian distribution.Sampling uses
UniformRandomProvider.nextDouble()
.- Since:
- 1.0
-
-
Constructor Summary
Constructors Constructor Description BoxMullerGaussianSampler(UniformRandomProvider rng, double mean, double standardDeviation)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description double
sample()
Deprecated.Creates adouble
sample.String
toString()
Deprecated.-
Methods inherited from class org.apache.commons.rng.sampling.distribution.SamplerBase
nextDouble, nextInt, nextInt, nextLong
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.commons.rng.sampling.distribution.ContinuousSampler
samples, samples
-
-
-
-
Constructor Detail
-
BoxMullerGaussianSampler
public BoxMullerGaussianSampler(UniformRandomProvider rng, double mean, double standardDeviation)
Deprecated.- Parameters:
rng
- Generator of uniformly distributed random numbers.mean
- Mean of the Gaussian distribution.standardDeviation
- Standard deviation of the Gaussian distribution.- Throws:
IllegalArgumentException
- ifstandardDeviation <= 0
-
-
Method Detail
-
sample
public double sample()
Deprecated.Creates adouble
sample.- Specified by:
sample
in interfaceContinuousSampler
- Returns:
- a sample.
-
toString
public String toString()
Deprecated.- Overrides:
toString
in classSamplerBase
-
-