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

Class RandomVariateGen

    • Constructor Detail

      • RandomVariateGen

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

      • nextDouble

        public double nextDouble()
        Generates a random number from the continuous 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
      • nextArrayOfDouble

        public void nextArrayOfDouble(double[] v,
                                      int start,
                                      int n)
        Generates n random numbers from the continuous distribution contained in this object. These numbers are stored in the array v, starting from index start. By default, this method calls nextDouble() n times, but one can override it in subclasses for better efficiency.
        Parameters:
        v - array in which the variates will be stored
        start - starting index, in v, of the new variates
        n - number of variates to generate
      • getStream

        public RandomStream getStream()
        Returns the RandomStream used by this generator.
        Returns:
        the stream associated to this object
      • getDistribution

        public Distribution getDistribution()
        Returns the Distribution used by this generator.
        Returns:
        the distribution associated to that object
      • toString

        public java.lang.String toString()
        Returns a String containing information about the current generator.
        Overrides:
        toString in class java.lang.Object

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.