Microsimulation API: ssim::CostReport< State, Time, Cost > Class Template Reference

Microsimulation API

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

CostReport class for collecting statistics on costs. More...

`#include <microsimulation.h>`

Collaboration diagram for ssim::CostReport< State, Time, Cost >:
[legend]

## Public Types
typedef std::set< Time, std::greater< Time > > | Partition
typedef std::pair< State, Time > | Pair
typedef CostReport< State, Time, Cost > | This
typedef std::unordered_map< pair< State, Time >, Cost > | Table
typedef std::vector< Cost > | IndividualCosts

## Public Member Functions
| CostReport (Cost discountRate=0, int size=1, Time startReportAge=Time(0), bool indiv=false)
void | individualReset ()
void | setIndivN (const int n)
void | setStartReportAge (const Time a)
Cost | discountedCost (Time a, Cost cost)
void | setPartition (const vector< Time > v)
void | setPartition (const Time start, const Time finish, const Time delta, const Time maxTime=Time(1.0e100))
void | clear ()
void | resize (int size)
void | append (This &new_report)
void | add (const State state, const Time time, const Cost cost, const int index=0)
SEXP | wrap ()
SEXP | wrap_indiv ()
SEXP | wrap_means ()

## Public Attributes
Cost | discountRate
Cost | current
Partition | _partition
Table | _table
IndividualCosts | _vector
Means | mean_costs
Time | startReportAge
int | id
bool | indiv

## Detailed Description

### template<class State, class Time = double, class Cost = double>
class ssim::CostReport< State, Time, Cost >

CostReport class for collecting statistics on costs.

Definition at line 1003 of file microsimulation.h.

## Member Typedef Documentation

## ◆ IndividualCosts

template<class State , class Time = double, class Cost = double>

typedef std::vector<Cost> ssim::CostReport< State, Time, Cost >::IndividualCosts

Definition at line 1009 of file microsimulation.h.

## ◆ Pair

template<class State , class Time = double, class Cost = double>

typedef std::pair<State,Time> ssim::CostReport< State, Time, Cost >::Pair

Definition at line 1006 of file microsimulation.h.

## ◆ Partition

template<class State , class Time = double, class Cost = double>

typedef std::set<Time, std::greater<Time> > ssim::CostReport< State, Time, Cost >::Partition

Definition at line 1005 of file microsimulation.h.

## ◆ Table

template<class State , class Time = double, class Cost = double>

typedef std::unordered_map<pair<State,Time>, Cost > ssim::CostReport< State, Time, Cost >::Table

Definition at line 1008 of file microsimulation.h.

## ◆ This

template<class State , class Time = double, class Cost = double>

typedef CostReport<State,Time,Cost> ssim::CostReport< State, Time, Cost >::This

Definition at line 1007 of file microsimulation.h.

## Constructor & Destructor Documentation

## ◆ CostReport()

template<class State , class Time = double, class Cost = double>

ssim::CostReport< State, Time, Cost >::CostReport | ( | Cost | discountRate = `0`,
|  | int | size = `1`,
|  | Time | startReportAge = `Time(0)`,
|  | bool | indiv = `false`
| ) |  |
| inline

Definition at line 1010 of file microsimulation.h.

## Member Function Documentation

## ◆ add()

template<class State , class Time = double, class Cost = double>

void ssim::CostReport< State, Time, Cost >::add | ( | const State | state,
|  | const Time | time,
|  | const Cost | cost,
|  | const int | index = `0`
| ) |  |
| inline

Definition at line 1066 of file microsimulation.h.

## ◆ append()

template<class State , class Time = double, class Cost = double>

void ssim::CostReport< State, Time, Cost >::append | ( | This & | new_report | ) |
| inline

Definition at line 1059 of file microsimulation.h.

## ◆ clear()

template<class State , class Time = double, class Cost = double>

void ssim::CostReport< State, Time, Cost >::clear | ( |  | ) |
| inline

Definition at line 1050 of file microsimulation.h.

## ◆ discountedCost()

template<class State , class Time = double, class Cost = double>

Cost ssim::CostReport< State, Time, Cost >::discountedCost | ( | Time | a,
|  | Cost | cost
| ) |  |
| inline

Definition at line 1032 of file microsimulation.h.

## ◆ individualReset()

template<class State , class Time = double, class Cost = double>

void ssim::CostReport< State, Time, Cost >::individualReset | ( |  | ) |
| inline

Definition at line 1013 of file microsimulation.h.

## ◆ resize()

template<class State , class Time = double, class Cost = double>

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

Definition at line 1056 of file microsimulation.h.

## ◆ setIndivN()

template<class State , class Time = double, class Cost = double>

void ssim::CostReport< State, Time, Cost >::setIndivN | ( | const int | n | ) |
| inline

Definition at line 1025 of file microsimulation.h.

## ◆ setPartition() [1/2]

template<class State , class Time = double, class Cost = double>

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

Definition at line 1044 of file microsimulation.h.

## ◆ setPartition() [2/2]

template<class State , class Time = double, class Cost = double>

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

Definition at line 1041 of file microsimulation.h.

## ◆ setStartReportAge()

template<class State , class Time = double, class Cost = double>

void ssim::CostReport< State, Time, Cost >::setStartReportAge | ( | const Time | a | ) |
| inline

Definition at line 1029 of file microsimulation.h.

## ◆ wrap()

template<class State , class Time = double, class Cost = double>

SEXP ssim::CostReport< State, Time, Cost >::wrap | ( |  | ) |
| inline

Definition at line 1076 of file microsimulation.h.

## ◆ wrap_indiv()

template<class State , class Time = double, class Cost = double>

SEXP ssim::CostReport< State, Time, Cost >::wrap_indiv | ( |  | ) |
| inline

Definition at line 1079 of file microsimulation.h.

## ◆ wrap_means()

template<class State , class Time = double, class Cost = double>

SEXP ssim::CostReport< State, Time, Cost >::wrap_means | ( |  | ) |
| inline

Definition at line 1082 of file microsimulation.h.

## Member Data Documentation

## ◆ _partition

template<class State , class Time = double, class Cost = double>

Partition ssim::CostReport< State, Time, Cost >::_partition

Definition at line 1086 of file microsimulation.h.

## ◆ _table

template<class State , class Time = double, class Cost = double>

Table ssim::CostReport< State, Time, Cost >::_table

Definition at line 1087 of file microsimulation.h.

## ◆ _vector

template<class State , class Time = double, class Cost = double>

IndividualCosts ssim::CostReport< State, Time, Cost >::_vector

Definition at line 1088 of file microsimulation.h.

## ◆ current

template<class State , class Time = double, class Cost = double>

Cost ssim::CostReport< State, Time, Cost >::current

Definition at line 1085 of file microsimulation.h.

## ◆ discountRate

template<class State , class Time = double, class Cost = double>

Cost ssim::CostReport< State, Time, Cost >::discountRate

Definition at line 1085 of file microsimulation.h.

## ◆ id

template<class State , class Time = double, class Cost = double>

int ssim::CostReport< State, Time, Cost >::id

Definition at line 1091 of file microsimulation.h.

## ◆ indiv

template<class State , class Time = double, class Cost = double>

bool ssim::CostReport< State, Time, Cost >::indiv

Definition at line 1092 of file microsimulation.h.

## ◆ mean_costs

template<class State , class Time = double, class Cost = double>

Means ssim::CostReport< State, Time, Cost >::mean_costs

Definition at line 1089 of file microsimulation.h.

## ◆ startReportAge

template<class State , class Time = double, class Cost = double>

Time ssim::CostReport< State, Time, Cost >::startReportAge

Definition at line 1090 of file microsimulation.h.

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

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