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

Class RandomVariateGenInt

    • Constructor Detail

      • RandomVariateGenInt

        public RandomVariateGenInt(RandomStream s,
                                   DiscreteDistributionInt dist)
        Creates a new random variate generator for the discrete distribution dist, using stream s.
        Parameters:
        s - random stream used for generating uniforms
        dist - discrete distribution object of the generated values
    • Method Detail

      • nextInt

        public int nextInt()
        Generates a random number (an integer) from the discrete distribution contained in this object. By default, this method uses inversion by calling the inverseF method of the distribution object. Alternative generating methods are provided in subclasses.
        Returns:
        the generated value
      • nextArrayOfInt

        public void nextArrayOfInt(int[] v,
                                   int start,
                                   int n)
        Generates n random numbers from the discrete distribution contained in this object. The results are stored into the array v, starting from index start. By default, this method calls nextInt() n times, but one can reimplement it in subclasses for better efficiency.
        Parameters:
        v - array into which the variates will be stored
        start - starting index, in v, of the new variates
        n - number of variates being generated

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.