Rpexp is a random number generator class for piecewise constant hazards. Given time lower bounds t and piecewise constant hazards h, rand() returns a random time. The random number is calculated using the inversion formula. Constructors provided for arrays.
More...
#include <microsimulation.h>
|
| Rpexp () |
|
| Rpexp (double *hin, double *tin, int nin) |
|
double | rand (double u, double from=0.0) |
|
|
vector< double > | H |
|
vector< double > | h |
|
vector< double > | t |
|
int | n |
|
Rpexp is a random number generator class for piecewise constant hazards. Given time lower bounds t and piecewise constant hazards h, rand() returns a random time. The random number is calculated using the inversion formula. Constructors provided for arrays.
Definition at line 491 of file microsimulation.h.
◆ Rpexp() [1/2]
◆ Rpexp() [2/2]
ssim::Rpexp::Rpexp |
( |
double * |
hin, |
|
|
double * |
tin, |
|
|
int |
nin |
|
) |
| |
|
inline |
◆ rand()
double ssim::Rpexp::rand |
( |
double |
u, |
|
|
double |
from = 0.0 |
|
) |
| |
|
inline |
vector<double> ssim::Rpexp::H |
|
private |
vector<double> ssim::Rpexp::h |
|
private |
vector<double> ssim::Rpexp::t |
|
private |
The documentation for this class was generated from the following file: