Class InverseTransformParetoSampler

    • Field Detail

      • scale

        private final double scale
        Scale.
      • oneOverShape

        private final double oneOverShape
        1 / Shape.
    • Constructor Detail

      • InverseTransformParetoSampler

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

      • sample

        public double sample()
        Creates a double sample.
        Specified by:
        sample in interface ContinuousSampler
        Returns:
        a sample.
      • of

        public static SharedStateContinuousSampler of​(UniformRandomProvider rng,
                                                      double scale,
                                                      double shape)
        Creates a new Pareto distribution sampler.
        Parameters:
        rng - Generator of uniformly distributed random numbers.
        scale - Scale of the distribution.
        shape - Shape of the distribution.
        Returns:
        the sampler
        Throws:
        java.lang.IllegalArgumentException - if scale <= 0 or shape <= 0
        Since:
        1.3