Class BoxMullerGaussianSampler
java.lang.Object
org.apache.commons.rng.sampling.distribution.SamplerBase
org.apache.commons.rng.sampling.distribution.BoxMullerGaussianSampler
- All Implemented Interfaces:
ContinuousSampler
Deprecated.
Box-Muller algorithm for sampling from a Gaussian distribution.
Sampling uses:
- Since:
- 1.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final double
Deprecated.Mean.private double
Deprecated.Next gaussian.private final UniformRandomProvider
Deprecated.Underlying source of randomness.private final double
Deprecated.standardDeviation. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
BoxMullerGaussianSampler
(double mean, double standardDeviation, UniformRandomProvider rng) Deprecated.BoxMullerGaussianSampler
(UniformRandomProvider rng, double mean, double standardDeviation) Deprecated.Create an instance. -
Method Summary
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
-
Field Details
-
nextGaussian
private double nextGaussianDeprecated.Next gaussian. -
mean
private final double meanDeprecated.Mean. -
standardDeviation
private final double standardDeviationDeprecated.standardDeviation. -
rng
Deprecated.Underlying source of randomness.
-
-
Constructor Details
-
BoxMullerGaussianSampler
Deprecated.Create an instance.- 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
-
BoxMullerGaussianSampler
Deprecated.- Parameters:
mean
- Mean of the Gaussian distribution.standardDeviation
- Standard deviation of the Gaussian distribution.rng
- Generator of uniformly distributed random numbers.
-
-
Method Details
-
sample
public double sample()Deprecated.Creates adouble
sample.- Specified by:
sample
in interfaceContinuousSampler
- Returns:
- a sample.
-
toString
Deprecated.- Overrides:
toString
in classSamplerBase
-
BoxMullerNormalizedGaussianSampler
andGaussianSampler
instead.