public class ExponentialGen extends RandomVariateGen
The (non-static) nextDouble method simply calls inverseF on the distribution.
| Constructor and Description |
|---|
ExponentialGen(RandomStream s,
double lambda)
Creates an exponential random variate generator with
parameter λ = lambda, using stream s.
|
ExponentialGen(RandomStream s,
ExponentialDist dist)
Creates a new generator for the exponential
distribution dist and stream s.
|
| Modifier and Type | Method and Description |
|---|---|
double |
getLambda()
Returns the λ associated with this object.
|
static double |
nextDouble(RandomStream s,
double lambda)
Uses inversion to generate a new exponential variate
with parameter λ = lambda, using stream s.
|
getDistribution, getStream, nextArrayOfDouble, nextDouble, setStreampublic ExponentialGen(RandomStream s, double lambda)
public ExponentialGen(RandomStream s, ExponentialDist dist)
public static double nextDouble(RandomStream s, double lambda)
public double getLambda()
To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.