Class UniformLongSampler

    • Field Detail

      • rng

        protected final org.apache.commons.rng.UniformRandomProvider rng
        Underlying source of randomness.
    • Method Detail

      • of

        public static UniformLongSampler of​(org.apache.commons.rng.UniformRandomProvider rng,
                                            long lower,
                                            long upper)
        Creates a new discrete uniform distribution sampler.
        Parameters:
        rng - Generator of uniformly distributed random numbers.
        lower - Lower bound (inclusive) of the distribution.
        upper - Upper bound (inclusive) of the distribution.
        Returns:
        the sampler
        Throws:
        IllegalArgumentException - if lower > upper.