Class ChengBetaSampler.ChengBBBetaSampler

    • Field Detail

      • LN_5_P1

        private static final double LN_5_P1
        1 + natural logarithm of 5.
      • beta

        private final double beta
        The algorithm beta factor. This is not the beta distribution beta shape parameter.
      • gamma

        private final double gamma
        The algorithm gamma factor.
    • Constructor Detail

      • ChengBBBetaSampler

        ChengBBBetaSampler​(UniformRandomProvider rng,
                           boolean aIsAlphaShape,
                           double a,
                           double b)
        Parameters:
        rng - Generator of uniformly distributed random numbers.
        aIsAlphaShape - true if a is the beta distribution alpha shape parameter.
        a - min(alpha, beta) shape parameter.
        b - max(alpha, beta) shape parameter.
    • Method Detail

      • sample

        public double sample()
        Description copied from interface: ContinuousSampler
        Creates a double sample.
        Returns:
        a sample.
      • withUniformRandomProvider

        public SharedStateContinuousSampler withUniformRandomProvider​(UniformRandomProvider rng)
        Description copied from interface: SharedStateSampler
        Create a new instance of the sampler with the same underlying state using the given uniform random provider as the source of randomness.
        Parameters:
        rng - Generator of uniformly distributed random numbers.
        Returns:
        the sampler