Class InverseTransformParetoSampler

java.lang.Object
org.apache.commons.rng.sampling.distribution.SamplerBase
org.apache.commons.rng.sampling.distribution.InverseTransformParetoSampler
All Implemented Interfaces:
ContinuousSampler, SharedStateContinuousSampler, SharedStateSampler<SharedStateContinuousSampler>

public class InverseTransformParetoSampler extends SamplerBase implements SharedStateContinuousSampler
Since:
1.0
  • Field Details

    • scale

      private final double scale
      Scale.
    • oneOverShape

      private final double oneOverShape
      1 / Shape.
    • rng

      private final UniformRandomProvider rng
      Underlying source of randomness.
    • nextDouble

      private final LongToDoubleFunction nextDouble
      Method to generate the (1 - p) value.
  • Constructor Details

    • InverseTransformParetoSampler

      public InverseTransformParetoSampler(UniformRandomProvider rng, double scale, double shape)
      Create an instance.
      Parameters:
      rng - Generator of uniformly distributed random numbers.
      scale - Scale of the distribution.
      shape - Shape of the distribution.
      Throws:
      IllegalArgumentException - if scale <= 0 or shape <= 0
    • InverseTransformParetoSampler

      private InverseTransformParetoSampler(double scale, double shape, UniformRandomProvider rng)
      Parameters:
      scale - Scale of the distribution.
      shape - Shape of the distribution.
      rng - Generator of uniformly distributed random numbers.
    • InverseTransformParetoSampler

      private InverseTransformParetoSampler(UniformRandomProvider rng, InverseTransformParetoSampler source)
      Parameters:
      rng - Generator of uniformly distributed random numbers.
      source - Source to copy.
  • Method Details