Class StableSampler.Beta0WeronStableSampler

    • Field Detail

      • eps

        protected final double eps
        Epsilon (1 - alpha).
      • meps1

        protected final double meps1
        Epsilon (1 - alpha).
      • inv1mEps

        protected final double inv1mEps
        1 / alpha = 1 / (1 - eps).
      • epsDiv1mEps

        protected final double epsDiv1mEps
        (1 / alpha) - 1 = eps / (1 - eps).
    • Constructor Detail

      • Beta0WeronStableSampler

        Beta0WeronStableSampler​(UniformRandomProvider rng,
                                double alpha)
        Parameters:
        rng - Underlying source of randomness
        alpha - Stability parameter. Must be in the interval (0, 2].
    • Method Detail

      • sample

        public double sample()
        Description copied from class: StableSampler
        Generate a sample from a stable distribution.

        The distribution uses the 0-parameterization: S(alpha, beta, gamma, delta; 0).

        Specified by:
        sample in interface ContinuousSampler
        Specified by:
        sample in class StableSampler
        Returns:
        a sample.
      • createSample

        protected double createSample​(double phi,
                                      double w)
        Create the sample. This routine is robust to edge cases and returns a deviate at the extremes of the support. It correctly handles alpha -> 0 when the sample is increasingly likely to be +/- infinity.
        Parameters:
        phi - Uniform deviate in (-pi/2, pi/2)
        w - Exponential deviate
        Returns:
        x