SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.randvar.BetaStratifiedRejectionGen Class Reference

This class implements Beta random variate generators using the stratified rejection/patchwork rejection method from [202],. More...

Inheritance diagram for umontreal.ssj.randvar.BetaStratifiedRejectionGen:
umontreal.ssj.randvar.BetaGen umontreal.ssj.randvar.RandomVariateGen

Public Member Functions

 BetaStratifiedRejectionGen (RandomStream s, RandomStream aux, double alpha, double beta)
 Creates a beta random variate generator with parameters \(\alpha=\) alpha and \(\beta=\) beta, over the interval \((0,1)\), using main stream s and auxiliary stream aux.
 BetaStratifiedRejectionGen (RandomStream s, double alpha, double beta)
 Creates a beta random variate generator with parameters \(\alpha=\) alpha and \(\beta=\) beta, over the interval \((0,1)\), using stream s.
 BetaStratifiedRejectionGen (RandomStream s, RandomStream aux, double alpha, double beta, double a, double b)
 Creates a beta random variate generator with parameters.
 BetaStratifiedRejectionGen (RandomStream s, double alpha, double beta, double a, double b)
 Creates a beta random variate generator with parameters.
 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, BetaDist dist)
 Same as BetaStratifiedRejectionGen(s, s, dist).
RandomStream getAuxStream ()
 Returns the auxiliary stream associated with this object.
double nextDouble ()
 Generates a random number from the continuous distribution contained in this object.
Public Member Functions inherited from umontreal.ssj.randvar.BetaGen
 BetaGen (RandomStream s, double alpha, double beta, double a, double b)
 Creates a new beta generator with parameters \(\alpha=\) alpha and \(\beta=\) beta, over the interval.
 BetaGen (RandomStream s, double alpha, double beta)
 Creates a new beta generator with parameters \(\alpha=\) alpha and \(\beta=\) beta, over the interval \((0,1)\), using stream s.
 BetaGen (RandomStream s, BetaDist dist)
 Creates a new generator for the distribution dist, using stream s.
double getAlpha ()
 Returns the parameter \(\alpha\) of this object.
double getBeta ()
 Returns the parameter \(\beta\) of this object.
double getA ()
 Returns the parameter \(a\) of this object.
double getB ()
 Returns the parameter \(b\) of this object.
Public Member Functions inherited from umontreal.ssj.randvar.RandomVariateGen
 RandomVariateGen (RandomStream s, Distribution dist)
 Creates a new random variate generator from the distribution dist, using stream s.
void nextArrayOfDouble (double[] v, int start, int n)
 Generates n random numbers from the continuous distribution contained in this object.
double[] nextArrayOfDouble (int n)
 Generates n random numbers from the continuous distribution contained in this object, and returns them in a new array of size n.
RandomStream getStream ()
 Returns the umontreal.ssj.rng.RandomStream used by this generator.
void setStream (RandomStream stream)
 Sets the umontreal.ssj.rng.RandomStream used by this generator to stream.
Distribution getDistribution ()
 Returns the umontreal.ssj.probdist.Distribution used by this generator.
String toString ()
 Returns a String containing information about the current generator.

Static Public Member Functions

static double nextDouble (RandomStream s, double alpha, double beta, double a, double b)
 Generates a variate from the beta distribution with parameters.

Detailed Description

This class implements Beta random variate generators using the stratified rejection/patchwork rejection method from [202],.

[214]. This method draws one uniform from the main stream and uses the auxiliary stream for any additional uniform variates that might be needed.

Definition at line 44 of file BetaStratifiedRejectionGen.java.

Constructor & Destructor Documentation

◆ BetaStratifiedRejectionGen() [1/6]

umontreal.ssj.randvar.BetaStratifiedRejectionGen.BetaStratifiedRejectionGen ( RandomStream s,
RandomStream aux,
double alpha,
double beta )

Creates a beta random variate generator with parameters \(\alpha=\) alpha and \(\beta=\) 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.

Definition at line 92 of file BetaStratifiedRejectionGen.java.

◆ BetaStratifiedRejectionGen() [2/6]

umontreal.ssj.randvar.BetaStratifiedRejectionGen.BetaStratifiedRejectionGen ( RandomStream s,
double alpha,
double beta )

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

Definition at line 104 of file BetaStratifiedRejectionGen.java.

◆ BetaStratifiedRejectionGen() [3/6]

umontreal.ssj.randvar.BetaStratifiedRejectionGen.BetaStratifiedRejectionGen ( RandomStream s,
RandomStream aux,
double alpha,
double beta,
double a,
double b )

Creates a beta random variate generator with parameters.

\(\alpha=\) alpha and \(\beta=\) 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.

Definition at line 116 of file BetaStratifiedRejectionGen.java.

◆ BetaStratifiedRejectionGen() [4/6]

umontreal.ssj.randvar.BetaStratifiedRejectionGen.BetaStratifiedRejectionGen ( RandomStream s,
double alpha,
double beta,
double a,
double b )

Creates a beta random variate generator with parameters.

\(\alpha=\) alpha and \(\beta=\) beta, over the interval (a, b), using stream s.

Definition at line 129 of file BetaStratifiedRejectionGen.java.

◆ BetaStratifiedRejectionGen() [5/6]

umontreal.ssj.randvar.BetaStratifiedRejectionGen.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.

Definition at line 138 of file BetaStratifiedRejectionGen.java.

◆ BetaStratifiedRejectionGen() [6/6]

umontreal.ssj.randvar.BetaStratifiedRejectionGen.BetaStratifiedRejectionGen ( RandomStream s,
BetaDist dist )

Same as BetaStratifiedRejectionGen(s, s, dist).

The auxiliary stream used will be the same as the main stream.

Definition at line 150 of file BetaStratifiedRejectionGen.java.

Member Function Documentation

◆ getAuxStream()

RandomStream umontreal.ssj.randvar.BetaStratifiedRejectionGen.getAuxStream ( )

Returns the auxiliary stream associated with this object.

Definition at line 157 of file BetaStratifiedRejectionGen.java.

◆ nextDouble() [1/2]

double umontreal.ssj.randvar.BetaStratifiedRejectionGen.nextDouble ( )

Generates a random number from the continuous distribution contained in this object.

By default, this method uses inversion by calling the umontreal.ssj.probdist.ContinuousDistribution.inverseF method of the distribution object. Alternative generating methods are provided in subclasses.

Returns
the generated value

Reimplemented from umontreal.ssj.randvar.RandomVariateGen.

Definition at line 161 of file BetaStratifiedRejectionGen.java.

◆ nextDouble() [2/2]

double umontreal.ssj.randvar.BetaStratifiedRejectionGen.nextDouble ( RandomStream s,
double alpha,
double beta,
double a,
double b )
static

Generates a variate from the beta distribution with parameters.

\(\alpha= \) alpha, \(\beta= \) beta, over the interval \((a, b)\), using stream s.

Reimplemented from umontreal.ssj.randvar.BetaGen.

Definition at line 353 of file BetaStratifiedRejectionGen.java.


The documentation for this class was generated from the following file: