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...
Public Member Functions | |
| HypoExponentialGen (RandomStream stream, double[] lambda) | |
| Creates a hypoexponential random variate generator with rates. | |
| 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\)],. | |
| 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 stream, double[] lambda) |
| Uses inversion to generate a new hypoexponential variate with rates. | |
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).
Definition at line 40 of file HypoExponentialGen.java.
| umontreal.ssj.randvar.HypoExponentialGen.HypoExponentialGen | ( | RandomStream | stream, |
| double[] | lambda ) |
Creates a hypoexponential random variate generator with rates.
\(\lambda_i = \) lambda[ \(i-1\)], \(i = 1,…,k\), using stream stream.
Definition at line 48 of file HypoExponentialGen.java.
| umontreal.ssj.randvar.HypoExponentialGen.HypoExponentialGen | ( | RandomStream | stream, |
| HypoExponentialDist | dist ) |
Creates a new generator for the hypoexponential distribution dist with stream stream.
Definition at line 56 of file HypoExponentialGen.java.
| double[] umontreal.ssj.randvar.HypoExponentialGen.getLambda | ( | ) |
Returns the \(\lambda_i\) associated with this object.
Definition at line 76 of file HypoExponentialGen.java.
|
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.
Definition at line 69 of file HypoExponentialGen.java.
| void umontreal.ssj.randvar.HypoExponentialGen.setLambda | ( | double[] | lambda | ) |
Sets the rates \(\lambda_i = \) lam[ \(i-1\)],.
\(i = 1,…,k\) of this object.
Definition at line 85 of file HypoExponentialGen.java.