Simpact Cyan
Population based event driven simulation using mNRM
Public Member Functions | List of all members
HazardFunction Class Referenceabstract

Abstract base class which can be used for a hazard. More...

#include <hazardfunction.h>

Inheritance diagram for HazardFunction:
Inheritance graph
[legend]

Public Member Functions

virtual double evaluate (double t)=0
 Evaluate the hazard at time t. More...
 
virtual double calculateInternalTimeInterval (double t0, double dt)=0
 Map the real-world time dt to an internal time interval. More...
 
virtual double solveForRealTimeInterval (double t0, double Tdiff)=0
 For the specified internal time interval Tdiff, calculate the corresponding real-world time interval. More...
 

Detailed Description

Abstract base class which can be used for a hazard.

If this way of implementing a hazard is used, the parameters for the hazard must be specified using the constructor of a derived class. The advantage of this is that the functions HazardFunction::evaluate, HazardFunction::calculateInternalTimeInterval and HazardFunction::solveForRealTimeInterval are implemented in the derived class, allowing you to use different hazard implementations as parameter to some other function.

Member Function Documentation

virtual double HazardFunction::calculateInternalTimeInterval ( double  t0,
double  dt 
)
pure virtual

Map the real-world time dt to an internal time interval.

This calculates:

\[ dT = \int_{t_0}^{t_0 + dt} h(s) ds \]

Implemented in TimeLimitedHazardFunction, and HazardFunctionExp.

virtual double HazardFunction::evaluate ( double  t)
pure virtual

Evaluate the hazard at time t.

Implemented in TimeLimitedHazardFunction, and HazardFunctionExp.

virtual double HazardFunction::solveForRealTimeInterval ( double  t0,
double  Tdiff 
)
pure virtual

For the specified internal time interval Tdiff, calculate the corresponding real-world time interval.

This solves the following equation for $ dt $:

\[ Tdiff = \int_{t_0}^{t_0 + dt} h(s) ds \]

Implemented in TimeLimitedHazardFunction, and HazardFunctionExp.


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