public static class ZigguratSampler.Exponential extends ZigguratSampler
ZigguratSampler.Exponential, ZigguratSampler.NormalizedGaussian
Modifier and Type | Method and Description |
---|---|
static ZigguratSampler.Exponential |
of(UniformRandomProvider rng)
Create a new exponential sampler with
mean = 1 . |
static ZigguratSampler.Exponential |
of(UniformRandomProvider rng,
double mean)
Create a new exponential sampler with the specified
mean . |
double |
sample()
Creates a
double sample. |
String |
toString() |
ZigguratSampler.Exponential |
withUniformRandomProvider(UniformRandomProvider rng)
Create a new instance of the sampler with the same underlying state using the given
uniform random provider as the source of randomness.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
samples, samples
public double sample()
double
sample.public ZigguratSampler.Exponential withUniformRandomProvider(UniformRandomProvider rng)
rng
- Generator of uniformly distributed random numbers.public static ZigguratSampler.Exponential of(UniformRandomProvider rng)
mean = 1
.rng
- Generator of uniformly distributed random numbers.public static ZigguratSampler.Exponential of(UniformRandomProvider rng, double mean)
mean
.rng
- Generator of uniformly distributed random numbers.mean
- Mean.IllegalArgumentException
- if the mean is not strictly positive (mean <= 0
)Copyright © 2016–2022 The Apache Software Foundation. All rights reserved.