SSJ
V. labo.

umontreal.iro.lecuyer.randvar
Class BetaStratifiedRejectionGen

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

public class BetaStratifiedRejectionGen
extends BetaGen

BetaStratifiedRejectionGen

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)
          .
BetaStratifiedRejectionGen(RandomStream s, double alpha, double beta)
          .
BetaStratifiedRejectionGen(RandomStream s, double alpha, double beta, double a, double b)
          .
BetaStratifiedRejectionGen(RandomStream s, RandomStream aux, BetaDist dist)
          .
BetaStratifiedRejectionGen(RandomStream s, RandomStream aux, double alpha, double beta)
          .
BetaStratifiedRejectionGen(RandomStream s, RandomStream aux, double alpha, double beta, double a, double b)
          [tabb32]
 
Method Summary
 RandomStream getAuxStream()
          .
 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, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BetaStratifiedRejectionGen

public BetaStratifiedRejectionGen(RandomStream s,
                                  RandomStream aux,
                                  double alpha,
                                  double beta)
. \begin{tabb}Creates a beta random variate generator with parameters $\alpha =$
 ...
 ...mber of uniforms
 is required for a rejection-type generation method.
 \end{tabb}


BetaStratifiedRejectionGen

public BetaStratifiedRejectionGen(RandomStream s,
                                  double alpha,
                                  double beta)
. \begin{tabb}Creates a beta random variate generator with parameters $\alpha =$
 ...
 ...\ \texttt{beta}, over the interval $(0,1)$,
 using stream \texttt{s}.
 \end{tabb}


BetaStratifiedRejectionGen

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


BetaStratifiedRejectionGen

public BetaStratifiedRejectionGen(RandomStream s,
                                  double alpha,
                                  double beta,
                                  double a,
                                  double b)
. \begin{tabb}Creates a beta random variate generator with parameters $\alpha =$
 ...
 ...over the interval
 (\texttt{a}, \texttt{b}), using stream \texttt{s}.
 \end{tabb}


BetaStratifiedRejectionGen

public BetaStratifiedRejectionGen(RandomStream s,
                                  RandomStream aux,
                                  BetaDist dist)
. \begin{tabb}Creates a new generator for the distribution \texttt{dist},
 using t...
 ...hen a random number
 of variates must be drawn from the main stream.
 \end{tabb}


BetaStratifiedRejectionGen

public BetaStratifiedRejectionGen(RandomStream s,
                                  BetaDist dist)
. \begin{tabb}
 Same as \method{BetaStratifiedRejectionGen}{}\texttt{(s, s, dist)}.
 The auxiliary stream used will be the same as the main stream.
 \end{tabb}

Method Detail

getAuxStream

public RandomStream getAuxStream()
. \begin{tabb}Returns the auxiliary stream associated with this object.
 \end{tabb}


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)

SSJ
V. labo.

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