public final class LevySampler extends Object implements SharedStateContinuousSampler
Modifier and Type | Method and Description |
---|---|
static LevySampler |
of(UniformRandomProvider rng,
double location,
double scale)
Create a new Lévy distribution sampler.
|
double |
sample()
Creates a
double sample. |
String |
toString() |
LevySampler |
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.sample
in interface ContinuousSampler
public LevySampler withUniformRandomProvider(UniformRandomProvider rng)
withUniformRandomProvider
in interface SharedStateSampler<SharedStateContinuousSampler>
rng
- Generator of uniformly distributed random numbers.public static LevySampler of(UniformRandomProvider rng, double location, double scale)
rng
- Generator of uniformly distributed random numbers.location
- Location of the Lévy distribution.scale
- Scale of the Lévy distribution.IllegalArgumentException
- if scale <= 0
Copyright © 2016–2022 The Apache Software Foundation. All rights reserved.