SSJ
3.3.1
Stochastic Simulation in Java
|
This class implements Student random variate generators using the polar method of [14] . More...
Public Member Functions | |
StudentPolarGen (RandomStream s, int n) | |
Creates a Student random variate generator with \(n\) degrees of freedom, using stream s . | |
StudentPolarGen (RandomStream s, StudentDist dist) | |
Creates a new generator for the Student distribution dist and stream s . | |
double | nextDouble () |
Public Member Functions inherited from StudentGen | |
StudentGen (RandomStream s, int n) | |
Creates a Student random variate generator with \(n\) degrees of freedom, using stream s . | |
StudentGen (RandomStream s, StudentDist dist) | |
Creates a new generator for the Student distribution dist and stream s . | |
int | getN () |
Returns the value of \(n\) for 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 s, int n) |
Generates a new variate from the Student distribution with \(n = \) n degrees of freedom, using stream s . | |
Static Public Member Functions inherited from StudentGen | |
static double | nextDouble (RandomStream s, int n) |
Generates a new variate from the Student distribution with \(n = \) n degrees of freedom, using stream s . | |
Additional Inherited Members | |
Protected Member Functions inherited from StudentGen | |
void | setN (int nu) |
Protected Attributes inherited from StudentGen | |
int | n = -1 |
Protected Attributes inherited from RandomVariateGen | |
RandomStream | stream |
Distribution | dist |
This class implements Student random variate generators using the polar method of [14] .
The code is adapted from UNURAN (see [166] ).
The non-static nextDouble
method generates two variates at a time and the second one is saved for the next call. A pair of variates is generated every second call. In the static case, two variates are generated per call but only the first one is returned and the second is discarded.