Class InverseTransformParetoSampler
java.lang.Object
org.apache.commons.rng.sampling.distribution.SamplerBase
org.apache.commons.rng.sampling.distribution.InverseTransformParetoSampler
- All Implemented Interfaces:
ContinuousSampler
public class InverseTransformParetoSampler extends SamplerBase implements ContinuousSampler
Sampling from a Pareto distribution.
Sampling uses UniformRandomProvider.nextDouble().
- Since:
- 1.0
-
Constructor Summary
Constructors Constructor Description InverseTransformParetoSampler(UniformRandomProvider rng, double scale, double shape) -
Method Summary
Methods inherited from class org.apache.commons.rng.sampling.distribution.SamplerBase
nextDouble, nextInt, nextInt, nextLong
-
Constructor Details
-
InverseTransformParetoSampler
- Parameters:
rng- Generator of uniformly distributed random numbers.scale- Scale of the distribution.shape- Shape of the distribution.- Throws:
java.lang.IllegalArgumentException- ifscale <= 0orshape <= 0
-
-
Method Details
-
sample
public double sample()Creates a sample.- Specified by:
samplein interfaceContinuousSampler- Returns:
- a sample.
-
toString
public java.lang.String toString()- Overrides:
toStringin classSamplerBase
-