ContinuousSampler, SharedStateContinuousSampler, SharedStateSampler<SharedStateContinuousSampler>public class InverseTransformParetoSampler extends SamplerBase implements SharedStateContinuousSampler
Sampling uses UniformRandomProvider.nextDouble().
| Constructor | Description |
|---|---|
InverseTransformParetoSampler(org.apache.commons.rng.UniformRandomProvider rng,
double scale,
double shape) |
| Modifier and Type | Method | Description |
|---|---|---|
static SharedStateContinuousSampler |
of(org.apache.commons.rng.UniformRandomProvider rng,
double scale,
double shape) |
Creates a new Pareto distribution sampler.
|
double |
sample() |
Creates a sample.
|
java.lang.String |
toString() |
|
SharedStateContinuousSampler |
withUniformRandomProvider(org.apache.commons.rng.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, waitnextDouble, nextInt, nextInt, nextLongpublic InverseTransformParetoSampler(org.apache.commons.rng.UniformRandomProvider rng, double scale, double shape)
rng - Generator of uniformly distributed random numbers.scale - Scale of the distribution.shape - Shape of the distribution.java.lang.IllegalArgumentException - if scale <= 0 or shape <= 0public double sample()
sample in interface ContinuousSamplerpublic java.lang.String toString()
toString in class SamplerBasepublic SharedStateContinuousSampler withUniformRandomProvider(org.apache.commons.rng.UniformRandomProvider rng)
withUniformRandomProvider in interface SharedStateSampler<SharedStateContinuousSampler>rng - Generator of uniformly distributed random numbers.public static SharedStateContinuousSampler of(org.apache.commons.rng.UniformRandomProvider rng, double scale, double shape)
rng - Generator of uniformly distributed random numbers.scale - Scale of the distribution.shape - Shape of the distribution.java.lang.IllegalArgumentException - if scale <= 0 or shape <= 0Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.