Microsimulation API

Public Member Functions | Private Attributes | List of all members
ssim::Means Class Reference

Utility class to incrementally add values to calculate the mean, sum, variance and standard deviation. This could be replaced by boost::accumulator. More...

`#include <microsimulation.h>`

Collaboration diagram for ssim::Means:
[legend]

## Public Member Functions
double | mean ()
double | var ()
int | n ()
double | sum ()
double | sd ()
| Means ()
Means * | operator+= (const double value)
SEXP | wrap ()

## Private Attributes
int | _n
long double | _sum
long double | _sumsq

## Detailed Description

Utility class to incrementally add values to calculate the mean, sum, variance and standard deviation. This could be replaced by boost::accumulator.

Definition at line 300 of file microsimulation.h.

## Constructor & Destructor Documentation

## ◆ Means()

ssim::Means::Means | ( |  | ) |
| inline

Definition at line 307 of file microsimulation.h.

## Member Function Documentation

## ◆ mean()

double ssim::Means::mean | ( |  | ) |
| inline

Definition at line 302 of file microsimulation.h.

## ◆ n()

int ssim::Means::n | ( |  | ) |
| inline

Definition at line 304 of file microsimulation.h.

## ◆ operator+=()

Means* ssim::Means::operator+= | ( | const double | value | ) |
| inline

Definition at line 308 of file microsimulation.h.

## ◆ sd()

double ssim::Means::sd | ( |  | ) |
| inline

Definition at line 306 of file microsimulation.h.

## ◆ sum()

double ssim::Means::sum | ( |  | ) |
| inline

Definition at line 305 of file microsimulation.h.

## ◆ var()

double ssim::Means::var | ( |  | ) |
| inline

Definition at line 303 of file microsimulation.h.

## ◆ wrap()

SEXP ssim::Means::wrap | ( |  | ) |
| inline

Definition at line 314 of file microsimulation.h.

## Member Data Documentation

## ◆ _n

int ssim::Means::_n
| private

Definition at line 326 of file microsimulation.h.

## ◆ _sum

long double ssim::Means::_sum
| private

Definition at line 327 of file microsimulation.h.

## ◆ _sumsq

long double ssim::Means::_sumsq
| private

Definition at line 327 of file microsimulation.h.

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

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