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 BetaStratifiedRejectionGen

    java.lang.Object
      umontreal.iro.lecuyer.randvar.RandomVariateGen
          umontreal.iro.lecuyer.randvar.BetaGen
              umontreal.iro.lecuyer.randvar.BetaStratifiedRejectionGen

    public class BetaStratifiedRejectionGen

extends BetaGen

This class implements Beta random variate generators using the stratified rejection/patchwork rejection method. This method draws one uniform from the main stream and uses the auxiliary stream for any additional uniform variates that might be needed.

Constructor Summary
`BetaStratifiedRejectionGen(RandomStream s, BetaDist dist)` Same as `BetaStratifiedRejectionGen``(s, s, dist)`.
`BetaStratifiedRejectionGen(RandomStream s, double alpha, double beta)` Creates a beta random variate generator with parameters α = `alpha` and β = `beta`, over the interval (0, 1), using stream `s`.
`BetaStratifiedRejectionGen(RandomStream s, double alpha, double beta, double a, double b)` Creates a beta random variate generator with parameters α = `alpha` and β = `beta`, over the interval (`a`, `b`), using stream `s`.
`BetaStratifiedRejectionGen(RandomStream s, RandomStream aux, BetaDist dist)` Creates a new generator for the distribution `dist`, using the given stream `s` and auxiliary stream `aux`.
`BetaStratifiedRejectionGen(RandomStream s, RandomStream aux, double alpha, double beta)` Creates a beta random variate generator with parameters α = `alpha` and β = `beta`, over the interval (0, 1), using main stream `s` and auxiliary stream `aux`.
`BetaStratifiedRejectionGen(RandomStream s, RandomStream aux, double alpha, double beta, double a, double b)` Creates a beta random variate generator with parameters α = `alpha` and β = `beta`, over the interval (`a`, `b`), using main stream `s` and auxiliary stream `aux`.

Method Summary
`RandomStream` | `getAuxStream()` Returns the auxiliary stream associated with this object.
`double` | `nextDouble()` Generates a random number from the continuous distribution contained in this object.
`static double` | `nextDouble(RandomStream s, double alpha, double beta, double a, double b)`

Methods inherited from class umontreal.iro.lecuyer.randvar.BetaGen
`getA, getAlpha, getB, getBeta`

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

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

Constructor Detail

### BetaStratifiedRejectionGen

    public BetaStratifiedRejectionGen(RandomStream s,
                                      RandomStream aux,
                                      double alpha,
                                      double beta)

  Creates a beta random variate generator with parameters α = `alpha` and β = `beta`, over the interval (0, 1), using main stream `s` and auxiliary stream `aux`. The auxiliary stream is used when a random number of uniforms is required for a rejection-type generation method.

### BetaStratifiedRejectionGen

    public BetaStratifiedRejectionGen(RandomStream s,
                                      double alpha,
                                      double beta)

  Creates a beta random variate generator with parameters α = `alpha` and β = `beta`, over the interval (0, 1), using stream `s`.

### BetaStratifiedRejectionGen

    public BetaStratifiedRejectionGen(RandomStream s,
                                      RandomStream aux,
                                      double alpha,
                                      double beta,
                                      double a,
                                      double b)

  Creates a beta random variate generator with parameters α = `alpha` and β = `beta`, over the interval (`a`, `b`), using main stream `s` and auxiliary stream `aux`. The auxiliary stream is used when a random number of uniforms is required for a rejection-type generation method.

### BetaStratifiedRejectionGen

    public BetaStratifiedRejectionGen(RandomStream s,
                                      double alpha,
                                      double beta,
                                      double a,
                                      double b)

  Creates a beta random variate generator with parameters α = `alpha` and β = `beta`, over the interval (`a`, `b`), using stream `s`.

### BetaStratifiedRejectionGen

    public BetaStratifiedRejectionGen(RandomStream s,
                                      RandomStream aux,
                                      BetaDist dist)

  Creates a new generator for the distribution `dist`, using the given stream `s` and auxiliary stream `aux`. The auxiliary stream is used when a random number of variates must be drawn from the main stream.

### BetaStratifiedRejectionGen

    public BetaStratifiedRejectionGen(RandomStream s,
                                      BetaDist dist)

  Same as `BetaStratifiedRejectionGen``(s, s, dist)`. The auxiliary stream used will be the same as the main stream.

Method Detail

### getAuxStream

    public RandomStream getAuxStream()

  Returns the auxiliary stream associated with this object.

### nextDouble

    public double nextDouble()

  Description copied from class: `RandomVariateGen`
  Generates a random number from the continuous distribution contained in this object. By default, this method uses inversion by calling the `inverseF` method of the distribution object. Alternative generating methods are provided in subclasses.

  Overrides:
    `nextDouble` in class `RandomVariateGen`
  Returns:
    the generated value

### nextDouble

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

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.