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

Class UniformGen



  • public class UniformGen
    extends RandomVariateGen
    This class implements random variate generators for the (continuous) uniform distribution over the interval (a, b), where a and b are real numbers with a < b. The density is

    f (x) = 1/(b - a)         for a <= x <= b.

    The (non-static) nextDouble method simply calls inverseF on the distribution.

    • Constructor Detail

      • UniformGen

        public UniformGen(RandomStream s,
                          double a,
                          double b)
        Creates a uniform random variate generator over the interval (a, b), using stream s.
      • UniformGen

        public UniformGen(RandomStream s)
        Creates a uniform random variate generator over the interval (0, 1), using stream s.
      • UniformGen

        public UniformGen(RandomStream s,
                          UniformDist dist)
        Creates a new generator for the uniform distribution dist and stream s.
    • Method Detail

      • nextDouble

        public static double nextDouble(RandomStream s,
                                        double a,
                                        double b)
        Generates a uniform random variate over the interval (a, b) by inversion, using stream s.
      • getA

        public double getA()
        Returns the value of a for this object.
      • getB

        public double getB()
        Returns the value of b for this object.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.