Microsimulation API: ssim::Means Class Reference

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 455 of file microsimulation.h.

## Constructor & Destructor Documentation

## ◆ Means()

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

Definition at line 462 of file microsimulation.h.

## Member Function Documentation

## ◆ mean()

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

Definition at line 457 of file microsimulation.h.

## ◆ n()

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

Definition at line 459 of file microsimulation.h.

## ◆ operator+=()

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

Definition at line 463 of file microsimulation.h.

## ◆ sd()

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

Definition at line 461 of file microsimulation.h.

## ◆ sum()

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

Definition at line 460 of file microsimulation.h.

## ◆ var()

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

Definition at line 458 of file microsimulation.h.

## ◆ wrap()

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

Definition at line 469 of file microsimulation.h.

## Member Data Documentation

## ◆ _n

int ssim::Means::_n
| private

Definition at line 481 of file microsimulation.h.

## ◆ _sum

long double ssim::Means::_sum
| private

Definition at line 482 of file microsimulation.h.

## ◆ _sumsq

long double ssim::Means::_sumsq
| private

Definition at line 482 of file microsimulation.h.

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

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