This class implements methods for generating random variates from the Gumbel distribution. More...
Public Member Functions | |
| GumbelGen (RandomStream s) | |
| Creates a Gumbel random number generator with \(\beta= 1\) and. | |
| GumbelGen (RandomStream s, double beta, double delta) | |
| Creates a Gumbel random number generator with parameters. | |
| GumbelGen (RandomStream s, GumbelDist dist) | |
| Creates a new generator for the Gumbel distribution dist and stream s. | |
| double | getBeta () |
| Returns the parameter \(\beta\). | |
| double | getDelta () |
| Returns the parameter \(\delta\). | |
| 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. | |
| double | nextDouble () |
| Generates a random number from the continuous distribution contained in this object. | |
| 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 beta, double delta) |
| Generates a new variate from the Gumbel distribution with parameters. | |
Protected Member Functions | |
| void | setParams (double beta, double delta) |
| Sets the parameters \(\beta\) and \(\delta\) of this object. | |
This class implements methods for generating random variates from the Gumbel distribution.
Its density is given by
\[ f (x) = \frac{e^{-z} e^{-e^{-z}}}{|\beta|}, \qquad\mbox{for } -\infty< x < \infty, \tag{densgumbel} \]
where we use the notation \(z = (x-\delta)/\beta\). The scale parameter \(\beta\) can be positive (for the Gumbel distribution) or negative (for the reverse Gumbel distribution), but not 0.
Definition at line 45 of file GumbelGen.java.
| umontreal.ssj.randvar.GumbelGen.GumbelGen | ( | RandomStream | s | ) |
Creates a Gumbel random number generator with \(\beta= 1\) and.
\(\delta= 0\) using stream s.
Definition at line 54 of file GumbelGen.java.
| umontreal.ssj.randvar.GumbelGen.GumbelGen | ( | RandomStream | s, |
| double | beta, | ||
| double | delta ) |
Creates a Gumbel random number generator with parameters.
\(\beta\) = beta and \(\delta\) = delta using stream s.
Definition at line 63 of file GumbelGen.java.
| umontreal.ssj.randvar.GumbelGen.GumbelGen | ( | RandomStream | s, |
| GumbelDist | dist ) |
Creates a new generator for the Gumbel distribution dist and stream s.
Definition at line 71 of file GumbelGen.java.
| double umontreal.ssj.randvar.GumbelGen.getBeta | ( | ) |
Returns the parameter \(\beta\).
Definition at line 89 of file GumbelGen.java.
| double umontreal.ssj.randvar.GumbelGen.getDelta | ( | ) |
Returns the parameter \(\delta\).
Definition at line 96 of file GumbelGen.java.
|
static |
Generates a new variate from the Gumbel distribution with parameters.
\(\beta= \) beta and \(\delta= \) delta using stream s.
Definition at line 82 of file GumbelGen.java.
|
protected |
Sets the parameters \(\beta\) and \(\delta\) of this object.
Definition at line 103 of file GumbelGen.java.