|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object umontreal.iro.lecuyer.randvar.RandomVariateGen umontreal.iro.lecuyer.randvar.UniformGen
public class UniformGen
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
The (non-static) nextDouble method simply calls inverseF on the distribution.
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
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. |
Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen |
---|
getDistribution, getStream, nextArrayOfDouble, nextDouble, setStream, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public UniformGen(RandomStream s, double a, double b)
public UniformGen(RandomStream s)
public UniformGen(RandomStream s, UniformDist dist)
Method Detail |
---|
public static double nextDouble(RandomStream s, double a, double b)
public double getA()
public double getB()
|
SSJ V. 2.6. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |