Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.randvar
Class ExponentialGen

    java.lang.Object
      umontreal.iro.lecuyer.randvar.RandomVariateGen
          umontreal.iro.lecuyer.randvar.ExponentialGen

    public class ExponentialGen

extends RandomVariateGen

This class implements random variate generators for the exponential distribution. The density is

f (x) = λe-λx for x >= 0,

where λ > 0.

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

Constructor Summary
`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`.

Method Summary
`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`.

Methods inherited from class umontreal.iro.lecuyer.randvar.RandomVariateGen
`getDistribution, getStream, nextArrayOfDouble, nextDouble, setStream`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ExponentialGen

    public ExponentialGen(RandomStream s,
                          double lambda)

  Creates an exponential random variate generator with parameter λ = `lambda`, using stream `s`.

### ExponentialGen

    public ExponentialGen(RandomStream s,
                          ExponentialDist dist)

  Creates a new generator for the exponential distribution `dist` and stream `s`.

Method Detail

### nextDouble

    public static double nextDouble(RandomStream s,
                                    double lambda)

  Uses inversion to generate a new exponential variate with parameter λ = `lambda`, using stream `s`.

### getLambda

    public double getLambda()

  Returns the λ associated with this object.

Overview | Package | Class | Tree | Deprecated | Index | Help
| SSJ V. 2.1.1.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.