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 doubleDeprecated.Mean.private doubleDeprecated.Next gaussian.private final UniformRandomProviderDeprecated.Underlying source of randomness.private final doubleDeprecated.standardDeviation. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBoxMullerGaussianSampler(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, nextLongMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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 adoublesample.- Specified by:
samplein interfaceContinuousSampler- Returns:
- a sample.
-
toString
Deprecated.- Overrides:
toStringin classSamplerBase
-
BoxMullerNormalizedGaussianSamplerandGaussianSamplerinstead.