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 RayleighGen

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

    public class RayleighGen

extends RandomVariateGen

This class implements random variate generators for the Rayleigh distribution. Its density is

f (x) | = | e-(x-a)2/(2β2) for x > = a |
f (x) | = | 0 for x < a, |

where β > 0.

Constructor Summary
`RayleighGen(RandomStream s, double beta)` Creates a Rayleigh random variate generator with parameters a = 0 and β = `beta`, using stream `s`.
`RayleighGen(RandomStream s, double a, double beta)` Creates a Rayleigh random variate generator with parameters a = `a` and β = `beta`, using stream `s`.
`RayleighGen(RandomStream s, RayleighDist dist)` Creates a new generator for the Rayleigh distribution `dist` and stream `s`.

Method Summary
`double` | `getA()` Returns the parameter a.
`double` | `getSigma()` Returns the parameter β.
`static double` | `nextDouble(RandomStream s, double a, double beta)` Uses inversion to generate a new variate from the Rayleigh distribution with parameters a = `a` and β = `beta`, using stream `s`.
`void` | `setParams(double a, double beta)` Sets the parameters a = `a` and β = `beta` for this object.

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

### RayleighGen

    public RayleighGen(RandomStream s,
                       double a,
                       double beta)

  Creates a Rayleigh random variate generator with parameters a = `a` and β = `beta`, using stream `s`.

### RayleighGen

    public RayleighGen(RandomStream s,
                       double beta)

  Creates a Rayleigh random variate generator with parameters a = 0 and β = `beta`, using stream `s`.

### RayleighGen

    public RayleighGen(RandomStream s,
                       RayleighDist dist)

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

Method Detail

### nextDouble

    public static double nextDouble(RandomStream s,
                                    double a,
                                    double beta)

  Uses inversion to generate a new variate from the Rayleigh distribution with parameters a = `a` and β = `beta`, using stream `s`.

### getA

    public double getA()

  Returns the parameter a.

### getSigma

    public double getSigma()

  Returns the parameter β.

### setParams

    public void setParams(double a,
                          double beta)

  Sets the parameters a = `a` and β = `beta` for 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.