public class UniformGen extends RandomVariateGen
The (non-static) nextDouble method simply calls inverseF on the distribution.
| Constructor and Description |
|---|
UniformGen(RandomStream s)
Creates a uniform random variate generator over the interval
(0, 1), using stream s.
|
UniformGen(RandomStream s,
double a,
double b)
Creates a uniform random variate generator over the interval
(a, b), using stream s.
|
UniformGen(RandomStream s,
UniformDist dist)
Creates a new generator for the uniform distribution dist
and stream s.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getA()
Returns the value of a for this object.
|
double |
getB()
Returns the value of b for this object.
|
static double |
nextDouble(RandomStream s,
double a,
double b)
Generates a uniform random variate over the interval
(a, b) by inversion, using stream s.
|
getDistribution, getStream, nextArrayOfDouble, nextDouble, setStreampublic UniformGen(RandomStream s, double a, double b)
public UniformGen(RandomStream s)
public UniformGen(RandomStream s, UniformDist dist)
public static double nextDouble(RandomStream s, double a, double b)
public double getA()
public double getB()
To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.