itpp::Stat Class Reference
Statistics Module » Miscellaneous Statistics Functions

A class for sampling a signal and calculating statistics. More...

`#include <itpp/stat/misc_stat.h>`

## Public Member Functions

| Stat ()
| Default constructor.
virtual | ~Stat ()
| Destructor.
virtual void | clear ()
| Clear statistics.
virtual void | sample (const double s, const bool overflow=false)
| Register a sample and flag for overflow.
int | n_overflows () const
| Number of reported overflows.
int | n_samples () const
| Number of samples.
int | n_zeros () const
| Number of zero samples.
double | avg () const
| Average over all samples.
double | max () const
| Maximum sample.
double | min () const
| Minimum sample.
double | sigma () const
| Standard deviation of all samples.
double | sqr_sum () const
| Squared sum of all samples.
double | sum () const
| Sum of all samples.
vec | histogram () const
| Histogram over all samples (not implemented yet)

## Protected Attributes

int | _n_overflows
| Number of reported overflows.
int | _n_samples
| Number of samples.
int | _n_zeros
| Number of zero samples.
double | _max
| Maximum sample.
double | _min
| Minimum sample.
double | _sqr_sum
| Squared sum of all samples.
double | _sum
| Sum of all samples.

## Detailed Description

A class for sampling a signal and calculating statistics.

Definition at line 48 of file misc_stat.h.

## Constructor & Destructor Documentation

## Stat()

itpp::Stat::Stat | ( |  | ) |

inline

Default constructor.

Definition at line 52 of file misc_stat.h.

## ~Stat()

virtual itpp::Stat::~Stat | ( |  | ) |

inline virtual

Destructor.

Definition at line 54 of file misc_stat.h.

## Member Function Documentation

## clear()

virtual void itpp::Stat::clear | ( |  | ) |

inline virtual

Clear statistics.

Definition at line 57 of file misc_stat.h.

## sample()

virtual void itpp::Stat::sample | ( | const double | s,
|  | const bool | overflow = `false`
| ) |  |

inline virtual

Register a sample and flag for overflow.

Definition at line 68 of file misc_stat.h.

Referenced by itpp::Fix_Base::apply_o_mode(), and itpp::Fix_Base::rshift_and_apply_q_mode().

## n_overflows()

int itpp::Stat::n_overflows | ( |  | ) | const

inline

Number of reported overflows.

Definition at line 79 of file misc_stat.h.

## n_samples()

int itpp::Stat::n_samples | ( |  | ) | const

inline

Number of samples.

Definition at line 81 of file misc_stat.h.

## n_zeros()

int itpp::Stat::n_zeros | ( |  | ) | const

inline

Number of zero samples.

Definition at line 83 of file misc_stat.h.

## avg()

double itpp::Stat::avg | ( |  | ) | const

inline

Average over all samples.

Definition at line 85 of file misc_stat.h.

## max()

double itpp::Stat::max | ( |  | ) | const

inline

Maximum sample.

Definition at line 87 of file misc_stat.h.

## min()

double itpp::Stat::min | ( |  | ) | const

inline

Minimum sample.

Definition at line 89 of file misc_stat.h.

## sigma()

double itpp::Stat::sigma | ( |  | ) | const

inline

Standard deviation of all samples.

Definition at line 91 of file misc_stat.h.

## sqr_sum()

double itpp::Stat::sqr_sum | ( |  | ) | const

inline

Squared sum of all samples.

Definition at line 96 of file misc_stat.h.

## sum()

double itpp::Stat::sum | ( |  | ) | const

inline

Sum of all samples.

Definition at line 98 of file misc_stat.h.

## histogram()

vec itpp::Stat::histogram | ( |  | ) | const

inline

Histogram over all samples (not implemented yet)

Definition at line 100 of file misc_stat.h.

## Member Data Documentation

## _n_overflows

int itpp::Stat::_n_overflows

protected

Number of reported overflows.

Definition at line 104 of file misc_stat.h.

## _n_samples

int itpp::Stat::_n_samples

protected

Number of samples.

Definition at line 106 of file misc_stat.h.

## _n_zeros

int itpp::Stat::_n_zeros

protected

Number of zero samples.

Definition at line 108 of file misc_stat.h.

## _max

double itpp::Stat::_max

protected

Maximum sample.

Definition at line 110 of file misc_stat.h.

## _min

double itpp::Stat::_min

protected

Minimum sample.

Definition at line 112 of file misc_stat.h.

## _sqr_sum

double itpp::Stat::_sqr_sum

protected

Squared sum of all samples.

Definition at line 114 of file misc_stat.h.

## _sum

double itpp::Stat::_sum

protected

Sum of all samples.

Definition at line 116 of file misc_stat.h.

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

- itpp/stat/misc_stat.h

Generated on Mon Apr 22 2024 09:45:27 for IT++ by Doxygen 1.9.8