Documentation of 'umontreal.iro.lecuyer.randvar.UniformIntGen' Java class
UniformIntGen
umontreal.iro.lecuyer.randvar

Class UniformIntGen



  • public class UniformIntGen
    extends RandomVariateGenInt
    This class implements a random variate generator for the uniform distribution over integers, over the interval [i, j]. Its mass function is

    p(x) = 1/(j - i + 1)         for x = i, i + 1,…, j

    and 0 elsewhere.
    • Constructor Detail

      • UniformIntGen

        public UniformIntGen(RandomStream s,
                             int i,
                             int j)
        Creates a uniform random variate generator over the integers in the closed interval [i, j], using stream s.
      • UniformIntGen

        public UniformIntGen(RandomStream s,
                             UniformIntDist dist)
        Creates a new generator for the distribution dist, using stream s.
    • Method Detail

      • nextInt

        public static int nextInt(RandomStream s,
                                  int i,
                                  int j)
        Generates a new uniform random variate over the interval [i, j], using stream s, by inversion.
      • getI

        public int getI()
        Returns the parameter i.
      • getJ

        public int getJ()
        Returns the parameter j.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.