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 boost::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 825 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 831 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 828 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 827 of file microsimulation.h.

## ◆ Table

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

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

Definition at line 830 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 829 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 832 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 888 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 881 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 872 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 854 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 835 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 878 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 847 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 866 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 863 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 851 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 898 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 901 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 904 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 908 of file microsimulation.h.

## ◆ _table

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

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

Definition at line 909 of file microsimulation.h.

## ◆ _vector

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

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

Definition at line 910 of file microsimulation.h.

## ◆ current

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

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

Definition at line 907 of file microsimulation.h.

## ◆ discountRate

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

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

Definition at line 907 of file microsimulation.h.

## ◆ id

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

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

Definition at line 913 of file microsimulation.h.

## ◆ indiv

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

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

Definition at line 914 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 911 of file microsimulation.h.

## ◆ startReportAge

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

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

Definition at line 912 of file microsimulation.h.

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

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