This class implements random variate generators for the hypoexponential distribution (see classes umontreal.ssj.probdist.HypoExponentialDist and umontreal.ssj.probdist.HypoExponentialDistQuick in package probdist
for the definition).
More...
|
| HypoExponentialGen (RandomStream stream, double[] lambda) |
| Creates a hypoexponential random variate generator with rates \lambda_i = lambda[ i-1] , i = 1,…,k, using stream stream .
|
|
| HypoExponentialGen (RandomStream stream, HypoExponentialDist dist) |
| Creates a new generator for the hypoexponential distribution dist with stream stream .
|
|
double [] | getLambda () |
| Returns the \lambda_i associated with this object.
|
|
void | setLambda (double[] lambda) |
| Sets the rates \lambda_i = lam[ i-1] , i = 1,…,k 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 double | nextDouble (RandomStream stream, double[] lambda) |
| Uses inversion to generate a new hypoexponential variate with rates \lambda_i = lambda[ i-1] , i = 1,…,k, using stream stream . More...
|
|
This class implements random variate generators for the hypoexponential distribution (see classes umontreal.ssj.probdist.HypoExponentialDist and umontreal.ssj.probdist.HypoExponentialDistQuick in package probdist
for the definition).
◆ nextDouble()
static double nextDouble |
( |
RandomStream |
stream, |
|
|
double [] |
lambda |
|
) |
| |
|
static |
Uses inversion to generate a new hypoexponential variate with rates \lambda_i = lambda[
i-1]
, i = 1,…,k, using stream stream
.
The inversion uses a root-finding method and is very slow.
The documentation for this class was generated from the following file: