Microsimulation API

Public Types | Public Member Functions | Public Attributes | List of all members
ssim::EventReport< State, Event, Time, Utility > Class Template Reference

EventReport class for collecting statistics on person-time, prevalence and numbers of events. More...

`#include <microsimulation.h>`

Collaboration diagram for ssim::EventReport< State, Event, Time, Utility >:
[legend]

## Public Types
typedef std::set< Time, std::greater< Time > > | Partition
typedef Partition::iterator | Iterator
typedef std::pair< State, Time > | Pair
typedef boost::unordered_map< pair< State, Time >, int > | PrevMap
typedef boost::unordered_map< pair< State, Time >, Utility > | UtilityMap
typedef boost::unordered_map< pair< State, Time >, Time > | PtMap
typedef boost::unordered_map< boost::tuple< State, Event, Time >, int > | EventsMap
typedef vector< Utility > | IndividualUtilities

## Public Member Functions
| EventReport (Utility discountRate=0.0, bool outputUtilities=true, int size=1, Time startReportAge=Time(0), bool indiv=false)
void | resize (int size)
void | setPartition (const vector< Time > v)
void | setPartition (const Time start, const Time finish, const Time delta, const Time maxTime=Time(1.0e100))
void | setIndivN (const int n)
void | setStartReportAge (const Time a)
void | clear ()
void | individualReset ()
Utility | discountedUtilities (Time a, Time b, Utility utility=1.0)
void | addBrief (const Time lhs, const Time rhs, const Utility utility=1)
void | add (const State state, const Event event, const Time lhs, const Time rhs, const Utility utility=1, int index=0)
template<class T >
void | append_map (T &base_map, T &new_map)
void | append (EventReport< State, Event, Time, Utility > &er)
SEXP | wrap ()
SEXP | wrap_indiv ()
SEXP | wrap_means ()

## Public Attributes
Utility | discountRate
Utility | current
bool | outputUtilities
Partition | _partition
PrevMap | _prev
UtilityMap | _ut
PtMap | _pt
EventsMap | _events
IndividualUtilities | _vector
Means | mean_utilities
Time | startReportAge
int | id
bool | indiv

## Detailed Description

### template<class State, class Event, class Time = double, class Utility = double>
class ssim::EventReport< State, Event, Time, Utility >

EventReport class for collecting statistics on person-time, prevalence and numbers of events.

Definition at line 490 of file microsimulation.h.

## Member Typedef Documentation

## ◆ EventsMap

template<class State , class Event , class Time = double, class Utility = double>

typedef boost::unordered_map<boost::tuple<State,Event,Time>, int > ssim::EventReport< State, Event, Time, Utility >::EventsMap

Definition at line 498 of file microsimulation.h.

## ◆ IndividualUtilities

template<class State , class Event , class Time = double, class Utility = double>

typedef vector<Utility> ssim::EventReport< State, Event, Time, Utility >::IndividualUtilities

Definition at line 499 of file microsimulation.h.

## ◆ Iterator

template<class State , class Event , class Time = double, class Utility = double>

typedef Partition::iterator ssim::EventReport< State, Event, Time, Utility >::Iterator

Definition at line 493 of file microsimulation.h.

## ◆ Pair

template<class State , class Event , class Time = double, class Utility = double>

typedef std::pair<State,Time> ssim::EventReport< State, Event, Time, Utility >::Pair

Definition at line 494 of file microsimulation.h.

## ◆ Partition

template<class State , class Event , class Time = double, class Utility = double>

typedef std::set<Time, std::greater<Time> > ssim::EventReport< State, Event, Time, Utility >::Partition

Definition at line 492 of file microsimulation.h.

## ◆ PrevMap

template<class State , class Event , class Time = double, class Utility = double>

typedef boost::unordered_map<pair<State,Time>, int > ssim::EventReport< State, Event, Time, Utility >::PrevMap

Definition at line 495 of file microsimulation.h.

## ◆ PtMap

template<class State , class Event , class Time = double, class Utility = double>

typedef boost::unordered_map<pair<State,Time>, Time > ssim::EventReport< State, Event, Time, Utility >::PtMap

Definition at line 497 of file microsimulation.h.

## ◆ UtilityMap

template<class State , class Event , class Time = double, class Utility = double>

typedef boost::unordered_map<pair<State,Time>, Utility > ssim::EventReport< State, Event, Time, Utility >::UtilityMap

Definition at line 496 of file microsimulation.h.

## Constructor & Destructor Documentation

## ◆ EventReport()

template<class State , class Event , class Time = double, class Utility = double>

ssim::EventReport< State, Event, Time, Utility >::EventReport | ( | Utility | discountRate = `0.0`,
|  | bool | outputUtilities = `true`,
|  | int | size = `1`,
|  | Time | startReportAge = `Time(0)`,
|  | bool | indiv = `false`
| ) |  |
| inline

Definition at line 500 of file microsimulation.h.

## Member Function Documentation

## ◆ add()

template<class State , class Event , class Time = double, class Utility = double>

void ssim::EventReport< State, Event, Time, Utility >::add | ( | const State | state,
|  | const Event | event,
|  | const Time | lhs,
|  | const Time | rhs,
|  | const Utility | utility = `1`,
|  | int | index = `0`
| ) |  |
| inline

Definition at line 560 of file microsimulation.h.

## ◆ addBrief()

template<class State , class Event , class Time = double, class Utility = double>

void ssim::EventReport< State, Event, Time, Utility >::addBrief | ( | const Time | lhs,
|  | const Time | rhs,
|  | const Utility | utility = `1`
| ) |  |
| inline

Definition at line 556 of file microsimulation.h.

## ◆ append()

template<class State , class Event , class Time = double, class Utility = double>

void ssim::EventReport< State, Event, Time, Utility >::append | ( | EventReport< State, Event, Time, Utility > & | er | ) |
| inline

Definition at line 594 of file microsimulation.h.

## ◆ append_map()

template<class State , class Event , class Time = double, class Utility = double>
template<class T >

void ssim::EventReport< State, Event, Time, Utility >::append_map | ( | T & | base_map,
|  | T & | new_map
| ) |  |
| inline

Definition at line 589 of file microsimulation.h.

## ◆ clear()

template<class State , class Event , class Time = double, class Utility = double>

void ssim::EventReport< State, Event, Time, Utility >::clear | ( |  | ) |
| inline

Definition at line 523 of file microsimulation.h.

## ◆ discountedUtilities()

template<class State , class Event , class Time = double, class Utility = double>

Utility ssim::EventReport< State, Event, Time, Utility >::discountedUtilities | ( | Time | a,
|  | Time | b,
|  | Utility | utility = `1.0`
| ) |  |
| inline

Definition at line 544 of file microsimulation.h.

## ◆ individualReset()

template<class State , class Event , class Time = double, class Utility = double>

void ssim::EventReport< State, Event, Time, Utility >::individualReset | ( |  | ) |
| inline

Definition at line 532 of file microsimulation.h.

## ◆ resize()

template<class State , class Event , class Time = double, class Utility = double>

void ssim::EventReport< State, Event, Time, Utility >::resize | ( | int | size | ) |
| inline

Definition at line 504 of file microsimulation.h.

## ◆ setIndivN()

template<class State , class Event , class Time = double, class Utility = double>

void ssim::EventReport< State, Event, Time, Utility >::setIndivN | ( | const int | n | ) |
| inline

Definition at line 516 of file microsimulation.h.

## ◆ setPartition() [1/2]

template<class State , class Event , class Time = double, class Utility = double>

void ssim::EventReport< State, Event, Time, Utility >::setPartition | ( | const Time | start,
|  | const Time | finish,
|  | const Time | delta,
|  | const Time | maxTime = `Time(1.0e100)`
| ) |  |
| inline

Definition at line 510 of file microsimulation.h.

## ◆ setPartition() [2/2]

template<class State , class Event , class Time = double, class Utility = double>

void ssim::EventReport< State, Event, Time, Utility >::setPartition | ( | const vector< Time > | v | ) |
| inline

Definition at line 507 of file microsimulation.h.

## ◆ setStartReportAge()

template<class State , class Event , class Time = double, class Utility = double>

void ssim::EventReport< State, Event, Time, Utility >::setStartReportAge | ( | const Time | a | ) |
| inline

Definition at line 520 of file microsimulation.h.

## ◆ wrap()

template<class State , class Event , class Time = double, class Utility = double>

SEXP ssim::EventReport< State, Event, Time, Utility >::wrap | ( |  | ) |
| inline

Definition at line 601 of file microsimulation.h.

## ◆ wrap_indiv()

template<class State , class Event , class Time = double, class Utility = double>

SEXP ssim::EventReport< State, Event, Time, Utility >::wrap_indiv | ( |  | ) |
| inline

Definition at line 614 of file microsimulation.h.

## ◆ wrap_means()

template<class State , class Event , class Time = double, class Utility = double>

SEXP ssim::EventReport< State, Event, Time, Utility >::wrap_means | ( |  | ) |
| inline

Definition at line 617 of file microsimulation.h.

## Member Data Documentation

## ◆ _events

template<class State , class Event , class Time = double, class Utility = double>

EventsMap ssim::EventReport< State, Event, Time, Utility >::_events

Definition at line 626 of file microsimulation.h.

## ◆ _partition

template<class State , class Event , class Time = double, class Utility = double>

Partition ssim::EventReport< State, Event, Time, Utility >::_partition

Definition at line 622 of file microsimulation.h.

## ◆ _prev

template<class State , class Event , class Time = double, class Utility = double>

PrevMap ssim::EventReport< State, Event, Time, Utility >::_prev

Definition at line 623 of file microsimulation.h.

## ◆ _pt

template<class State , class Event , class Time = double, class Utility = double>

PtMap ssim::EventReport< State, Event, Time, Utility >::_pt

Definition at line 625 of file microsimulation.h.

## ◆ _ut

template<class State , class Event , class Time = double, class Utility = double>

UtilityMap ssim::EventReport< State, Event, Time, Utility >::_ut

Definition at line 624 of file microsimulation.h.

## ◆ _vector

template<class State , class Event , class Time = double, class Utility = double>

IndividualUtilities ssim::EventReport< State, Event, Time, Utility >::_vector

Definition at line 627 of file microsimulation.h.

## ◆ current

template<class State , class Event , class Time = double, class Utility = double>

Utility ssim::EventReport< State, Event, Time, Utility >::current

Definition at line 620 of file microsimulation.h.

## ◆ discountRate

template<class State , class Event , class Time = double, class Utility = double>

Utility ssim::EventReport< State, Event, Time, Utility >::discountRate

Definition at line 620 of file microsimulation.h.

## ◆ id

template<class State , class Event , class Time = double, class Utility = double>

int ssim::EventReport< State, Event, Time, Utility >::id

Definition at line 630 of file microsimulation.h.

## ◆ indiv

template<class State , class Event , class Time = double, class Utility = double>

bool ssim::EventReport< State, Event, Time, Utility >::indiv

Definition at line 631 of file microsimulation.h.

## ◆ mean_utilities

template<class State , class Event , class Time = double, class Utility = double>

Means ssim::EventReport< State, Event, Time, Utility >::mean_utilities

Definition at line 628 of file microsimulation.h.

## ◆ outputUtilities

template<class State , class Event , class Time = double, class Utility = double>

bool ssim::EventReport< State, Event, Time, Utility >::outputUtilities

Definition at line 621 of file microsimulation.h.

## ◆ startReportAge

template<class State , class Event , class Time = double, class Utility = double>

Time ssim::EventReport< State, Event, Time, Utility >::startReportAge

Definition at line 629 of file microsimulation.h.

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

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