SSJ
3.3.1
Stochastic Simulation in Java
|
This class implements symmetrical beta random variate generators using Devroye’s one-liner method. More...
Public Member Functions | |
BetaSymmetricalBestGen (RandomStream s1, RandomStream s2, RandomStream s3, double alpha) | |
Creates a symmetrical beta random variate generator with parameter \(\alpha=\) alpha , using stream s1 to generate \(U_1\), stream s2 to generate \(U_2\) and stream s3 to generate \(S\), as given in equation ( eq.beta.best ). | |
BetaSymmetricalBestGen (RandomStream s1, double alpha) | |
Creates a symmetrical beta random variate generator with parameter \(\alpha=\) alpha , using only one stream s1 to generate \(U_1\), \(U_2\), and \(S\) as given in equation ( eq.beta.best ). | |
BetaSymmetricalBestGen (RandomStream s1, RandomStream s2, RandomStream s3, BetaSymmetricalDist dist) | |
Creates a new generator for the distribution dist , using stream s1 to generate \(U_1\), stream s2 to generate \(U_2\) and stream s3 to generate \(S\) as given in equation ( eq.beta.best ). | |
BetaSymmetricalBestGen (RandomStream s1, BetaSymmetricalDist dist) | |
Creates a new generator for the distribution dist , using only one stream s1 . | |
double | nextDouble () |
RandomStream | getStream2 () |
Returns stream s2 associated with this object. | |
RandomStream | getStream3 () |
Returns stream s3 associated with this object. | |
Public Member Functions inherited from BetaSymmetricalGen | |
BetaSymmetricalGen (RandomStream s, double alpha) | |
Creates a new symmetrical beta generator with parameters \(\alpha=\) alpha , over the interval \((0,1)\), using stream s . | |
BetaSymmetricalGen (RandomStream s, BetaSymmetricalDist dist) | |
Creates a new generator for the distribution dist , using stream s . | |
Public Member Functions inherited from 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 \((\)a \(,\) b \()\), using stream s . | |
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 RandomVariateGen | |
RandomVariateGen (RandomStream s, Distribution dist) | |
Creates a new random variate generator from the distribution dist , using stream s . More... | |
double | nextDouble () |
Generates a random number from the continuous distribution contained in this object. More... | |
void | nextArrayOfDouble (double[] v, int start, int n) |
Generates n random numbers from the continuous distribution contained in this object. More... | |
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 . More... | |
RandomStream | getStream () |
Returns the umontreal.ssj.rng.RandomStream used by this generator. More... | |
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. More... | |
String | toString () |
Returns a String containing information about the current generator. | |
Static Public Member Functions | |
static double | nextDouble (RandomStream s1, RandomStream s2, RandomStream s3, double alpha) |
Generates a random number using Devroye’s one-liner method. More... | |
static double | nextDouble (RandomStream s, double alpha) |
Generates a random number using Devroye’s one-liner method with only one stream s . More... | |
Static Public Member Functions inherited from BetaSymmetricalGen | |
static double | nextDouble (RandomStream s, double alpha) |
Static Public Member Functions inherited from BetaGen | |
static double | nextDouble (RandomStream s, double alpha, double beta, double a, double b) |
Generates a variate from the beta distribution with parameters \(\alpha= \) alpha , \(\beta= \) beta , over the interval \((a, b)\), using stream s . | |
Additional Inherited Members | |
Protected Member Functions inherited from BetaGen | |
void | setParams (double alpha, double beta, double aa, double bb) |
Protected Attributes inherited from BetaGen | |
double | p |
double | q |
double | a |
double | b |
int | gen |
Protected Attributes inherited from RandomVariateGen | |
RandomStream | stream |
Distribution | dist |
This class implements symmetrical beta random variate generators using Devroye’s one-liner method.
It is based on Best’s relation [18] between a Student- \(t\) variate and a symmetrical beta variate:
\[ B_{\alpha, \alpha} \stackrel{\mathcal{L}}{=} \frac{1}{2} \left( 1 + \frac{T_{2\alpha}}{\sqrt{2\alpha+ T_{2\alpha}^2}}\right). \]
If \(S\) is a random sign and \(U_1\), \(U_2\) are two independent uniform \([0,1]\) random variates, then the following gives a symmetrical beta variate [47] :
\[ B_{\alpha, \alpha} \stackrel{\mathcal{L}}{=} \frac{1}{2} + \frac{S}{2 \sqrt{1 + \frac{1}{\left(U_1^{-1/\alpha} - 1\right)\cos^2(2\pi U_2)}}} \tag{eq.beta.best} \]
valid for any shape parameter \(\alpha> 0\).
|
static |
Generates a random number using Devroye’s one-liner method.
Restriction: \(\alpha> 0\).
|
static |
Generates a random number using Devroye’s one-liner method with only one stream s
.
Restriction: \(\alpha> 0\).