Microsimulation API

Public Member Functions | Private Attributes | List of all members
ssim::Rpexp Class Reference

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>`

Collaboration diagram for ssim::Rpexp:
[legend]

## Public Member Functions
| Rpexp ()
| Rpexp (double *hin, double *tin, int nin)
double | rand (double u, double from=0.0)

## Private Attributes
vector< double > | H
vector< double > | h
vector< double > | t
int | n

## Detailed Description

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 336 of file microsimulation.h.

## Constructor & Destructor Documentation

## ◆ Rpexp() [1/2]

ssim::Rpexp::Rpexp | ( |  | ) |
| inline

Definition at line 338 of file microsimulation.h.

## ◆ Rpexp() [2/2]

ssim::Rpexp::Rpexp | ( | double * | hin,
|  | double * | tin,
|  | int | nin
| ) |  |
| inline

Definition at line 339 of file microsimulation.h.

## Member Function Documentation

## ◆ rand()

double ssim::Rpexp::rand | ( | double | u,
|  | double | from = `0.0`
| ) |  |
| inline

Definition at line 362 of file microsimulation.h.

## Member Data Documentation

## ◆ H

vector<double> ssim::Rpexp::H
| private

Definition at line 376 of file microsimulation.h.

## ◆ h

vector<double> ssim::Rpexp::h
| private

Definition at line 376 of file microsimulation.h.

## ◆ n

int ssim::Rpexp::n
| private

Definition at line 377 of file microsimulation.h.

## ◆ t

vector<double> ssim::Rpexp::t
| private

Definition at line 376 of file microsimulation.h.

The documentation for this class was generated from the following file:

- /home/marcle/src/R/microsimulation/inst/include/microsimulation.h