Microsimulation API: ssim::SummaryReport< State, Event, Time, Utility, Cost > Class Template Reference

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 std::unordered_map< pair< State, Time >, int > | PrevMap
typedef std::unordered_map< pair< State, Time >, Utility > | UtilityMap
typedef std::unordered_map< pair< State, Time >, Time > | PtMap
typedef std::unordered_map< std::tuple< State, Event, Time >, int > | EventMap
typedef std::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 816 of file microsimulation.h.

## Member Typedef Documentation

## ◆ CostMap

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

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

Definition at line 825 of file microsimulation.h.

## ◆ EventMap

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

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

Definition at line 824 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 826 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 827 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 819 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 820 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 818 of file microsimulation.h.

## ◆ PrevMap

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

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

Definition at line 821 of file microsimulation.h.

## ◆ PtMap

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

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

Definition at line 823 of file microsimulation.h.

## ◆ UtilityMap

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

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

Definition at line 822 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 828 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 875 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 910 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 918 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 979 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 927 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 865 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 968 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 957 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 946 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 834 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 862 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 846 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 838 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 853 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 850 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 859 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 842 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 991 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 990 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 993 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 992 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 986 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 987 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 989 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 988 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 996 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 996 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 996 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 985 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 984 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 995 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 995 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 995 of file microsimulation.h.

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

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