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

Class UnuranDiscreteInt



  • public class UnuranDiscreteInt
    extends RandomVariateGenInt
    This class permits one to create a discrete univariate distribution using UNURAN via its string API.
    • Constructor Detail

      • UnuranDiscreteInt

        public UnuranDiscreteInt(RandomStream s,
                                 RandomStream aux,
                                 java.lang.String genStr)
        Constructs a new discrete random number generator using the UNURAN generator specification string genStr, main stream s, and auxiliary stream aux.
    • Method Detail

      • nextInt

        public int nextInt()
        Description copied from class: RandomVariateGenInt
        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.
        Overrides:
        nextInt in class RandomVariateGenInt
        Returns:
        the generated value
      • nextArrayOfInt

        public void nextArrayOfInt(int[] v,
                                   int start,
                                   int n)
        Description copied from class: RandomVariateGenInt
        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.
        Overrides:
        nextArrayOfInt in class RandomVariateGenInt
        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
      • getAuxStream

        public RandomStream getAuxStream()
        Returns the auxiliary random number stream.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.