Microsimulation API

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

SummaryReport class for collecting statistics on person-time, prevalence, events and costs. More...

`#include <microsimulation.h>`

Collaboration diagram for ssim::SummaryReport< State, Event, Time, Utility, Cost >:
[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 > | EventMap
typedef boost::unordered_map< pair< State, Time >, Cost > | CostMap
typedef std::vector< Cost > | IndividualCosts
typedef std::vector< Utility > | IndividualUtilities

## Public Member Functions
| SummaryReport (int n=1, bool indivp=true, Utility discountRate=0.0)
void | resize (int size)
void | setDiscountRate (Utility discountRate)
void | setUtilityDiscountRate (Utility discountRate)
void | setCostDiscountRate (Cost discountRate)
void | setPartition (const vector< Time > v)
void | setPartition (const Time start, const Time finish, const Time delta, const Time maxTime=Time(1.0e100))
void | setUtility (Utility _utility)
void | setCost (Cost _cost)
void | clear ()
void | add (const State state, const Event event, const Time lhs, const Time rhs, int index=0)
void | addPointCost (const State state, const Cost cost, int index=0)
void | append (SummaryReport< State, Event, Time, Utility > &er)
Rcpp::List | asList ()
Utility | discountedUtilityInterval (Time a, Time b, Utility utility)
Cost | discountedCostInterval (Time a, Time b, Cost cost)
Cost | discountedCost (Time a, Cost cost)
template<class T >
void | append_map (T &base_map, T &new_map)

## Public Attributes
int | n
bool | indivp
Partition | _partition
PrevMap | _prev
UtilityMap | _ut
PtMap | _pt
EventMap | _events
CostMap | _costs
IndividualUtilities | _indivUtilities
IndividualCosts | _indivCosts
Utility | utilityDiscountRate
Utility | utilityAlpha
Utility | utility
Cost | costDiscountRate
Cost | costAlpha
Cost | cost

## Detailed Description

### template<class State, class Event = short, class Time = double, class Utility = double, class Cost = double>
class ssim::SummaryReport< State, Event, Time, Utility, Cost >

SummaryReport class for collecting statistics on person-time, prevalence, events and costs.

Definition at line 638 of file microsimulation.h.

## Member Typedef Documentation

## ◆ CostMap

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

typedef boost::unordered_map<pair<State,Time>, Cost > ssim::SummaryReport< State, Event, Time, Utility, Cost >::CostMap

Definition at line 647 of file microsimulation.h.

## ◆ EventMap

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

typedef boost::unordered_map<boost::tuple<State,Event,Time>, int > ssim::SummaryReport< State, Event, Time, Utility, Cost >::EventMap

Definition at line 646 of file microsimulation.h.

## ◆ IndividualCosts

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

typedef std::vector<Cost> ssim::SummaryReport< State, Event, Time, Utility, Cost >::IndividualCosts

Definition at line 648 of file microsimulation.h.

## ◆ IndividualUtilities

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

typedef std::vector<Utility> ssim::SummaryReport< State, Event, Time, Utility, Cost >::IndividualUtilities

Definition at line 649 of file microsimulation.h.

## ◆ Iterator

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

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

Definition at line 641 of file microsimulation.h.

## ◆ Pair

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

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

Definition at line 642 of file microsimulation.h.

## ◆ Partition

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

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

Definition at line 640 of file microsimulation.h.

## ◆ PrevMap

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

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

Definition at line 643 of file microsimulation.h.

## ◆ PtMap

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

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

Definition at line 645 of file microsimulation.h.

## ◆ UtilityMap

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

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

Definition at line 644 of file microsimulation.h.

## Constructor & Destructor Documentation

## ◆ SummaryReport()

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

ssim::SummaryReport< State, Event, Time, Utility, Cost >::SummaryReport | ( | int | n = `1`,
|  | bool | indivp = `true`,
|  | Utility | discountRate = `0.0`
| ) |  |
| inline

Definition at line 650 of file microsimulation.h.

## Member Function Documentation

## ◆ add()

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

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

Definition at line 697 of file microsimulation.h.

## ◆ addPointCost()

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

void ssim::SummaryReport< State, Event, Time, Utility, Cost >::addPointCost | ( | const State | state,
|  | const Cost | cost,
|  | int | index = `0`
| ) |  |
| inline

Definition at line 732 of file microsimulation.h.

## ◆ append()

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

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

Definition at line 740 of file microsimulation.h.

## ◆ append_map()

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

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

Definition at line 801 of file microsimulation.h.

## ◆ asList()

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

Rcpp::List ssim::SummaryReport< State, Event, Time, Utility, Cost >::asList | ( |  | ) |
| inline

Definition at line 749 of file microsimulation.h.

## ◆ clear()

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

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

Definition at line 687 of file microsimulation.h.

## ◆ discountedCost()

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

Cost ssim::SummaryReport< State, Event, Time, Utility, Cost >::discountedCost | ( | Time | a,
|  | Cost | cost
| ) |  |
| inline

Definition at line 790 of file microsimulation.h.

## ◆ discountedCostInterval()

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

Cost ssim::SummaryReport< State, Event, Time, Utility, Cost >::discountedCostInterval | ( | Time | a,
|  | Time | b,
|  | Cost | cost
| ) |  |
| inline

Definition at line 779 of file microsimulation.h.

## ◆ discountedUtilityInterval()

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

Utility ssim::SummaryReport< State, Event, Time, Utility, Cost >::discountedUtilityInterval | ( | Time | a,
|  | Time | b,
|  | Utility | utility
| ) |  |
| inline

Definition at line 768 of file microsimulation.h.

## ◆ resize()

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

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

Definition at line 656 of file microsimulation.h.

## ◆ setCost()

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

void ssim::SummaryReport< State, Event, Time, Utility, Cost >::setCost | ( | Cost | _cost | ) |
| inline

Definition at line 684 of file microsimulation.h.

## ◆ setCostDiscountRate()

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

void ssim::SummaryReport< State, Event, Time, Utility, Cost >::setCostDiscountRate | ( | Cost | discountRate | ) |
| inline

Definition at line 668 of file microsimulation.h.

## ◆ setDiscountRate()

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

void ssim::SummaryReport< State, Event, Time, Utility, Cost >::setDiscountRate | ( | Utility | discountRate | ) |
| inline

Definition at line 660 of file microsimulation.h.

## ◆ setPartition() [1/2]

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

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

Definition at line 675 of file microsimulation.h.

## ◆ setPartition() [2/2]

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

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

Definition at line 672 of file microsimulation.h.

## ◆ setUtility()

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

void ssim::SummaryReport< State, Event, Time, Utility, Cost >::setUtility | ( | Utility | _utility | ) |
| inline

Definition at line 681 of file microsimulation.h.

## ◆ setUtilityDiscountRate()

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

void ssim::SummaryReport< State, Event, Time, Utility, Cost >::setUtilityDiscountRate | ( | Utility | discountRate | ) |
| inline

Definition at line 664 of file microsimulation.h.

## Member Data Documentation

## ◆ _costs

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

CostMap ssim::SummaryReport< State, Event, Time, Utility, Cost >::_costs

Definition at line 813 of file microsimulation.h.

## ◆ _events

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

EventMap ssim::SummaryReport< State, Event, Time, Utility, Cost >::_events

Definition at line 812 of file microsimulation.h.

## ◆ _indivCosts

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

IndividualCosts ssim::SummaryReport< State, Event, Time, Utility, Cost >::_indivCosts

Definition at line 815 of file microsimulation.h.

## ◆ _indivUtilities

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

IndividualUtilities ssim::SummaryReport< State, Event, Time, Utility, Cost >::_indivUtilities

Definition at line 814 of file microsimulation.h.

## ◆ _partition

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

Partition ssim::SummaryReport< State, Event, Time, Utility, Cost >::_partition

Definition at line 808 of file microsimulation.h.

## ◆ _prev

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

PrevMap ssim::SummaryReport< State, Event, Time, Utility, Cost >::_prev

Definition at line 809 of file microsimulation.h.

## ◆ _pt

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

PtMap ssim::SummaryReport< State, Event, Time, Utility, Cost >::_pt

Definition at line 811 of file microsimulation.h.

## ◆ _ut

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

UtilityMap ssim::SummaryReport< State, Event, Time, Utility, Cost >::_ut

Definition at line 810 of file microsimulation.h.

## ◆ cost

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

Cost ssim::SummaryReport< State, Event, Time, Utility, Cost >::cost

Definition at line 818 of file microsimulation.h.

## ◆ costAlpha

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

Cost ssim::SummaryReport< State, Event, Time, Utility, Cost >::costAlpha

Definition at line 818 of file microsimulation.h.

## ◆ costDiscountRate

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

Cost ssim::SummaryReport< State, Event, Time, Utility, Cost >::costDiscountRate

Definition at line 818 of file microsimulation.h.

## ◆ indivp

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

bool ssim::SummaryReport< State, Event, Time, Utility, Cost >::indivp

Definition at line 807 of file microsimulation.h.

## ◆ n

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

int ssim::SummaryReport< State, Event, Time, Utility, Cost >::n

Definition at line 806 of file microsimulation.h.

## ◆ utility

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

Utility ssim::SummaryReport< State, Event, Time, Utility, Cost >::utility

Definition at line 817 of file microsimulation.h.

## ◆ utilityAlpha

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

Utility ssim::SummaryReport< State, Event, Time, Utility, Cost >::utilityAlpha

Definition at line 817 of file microsimulation.h.

## ◆ utilityDiscountRate

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

Utility ssim::SummaryReport< State, Event, Time, Utility, Cost >::utilityDiscountRate

Definition at line 817 of file microsimulation.h.

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

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