#include <itpp/base/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. | |
Definition at line 51 of file stat.h.
| itpp::Stat::Stat | ( | ) | [inline] |
| virtual void itpp::Stat::clear | ( | ) | [inline, virtual] |
Clear statistics.
Definition at line 59 of file stat.h.
References _max, _min, _n_overflows, _n_samples, _n_zeros, _sqr_sum, and _sum.
Referenced by Stat().
| virtual void itpp::Stat::sample | ( | const double | s, | |
| const bool | overflow = false | |||
| ) | [inline, virtual] |
Register a sample and flag for overflow.
Definition at line 71 of file stat.h.
References _max, _min, _n_overflows, _n_samples, _n_zeros, _sqr_sum, and _sum.
Referenced by itpp::Fix_Base::apply_o_mode(), and itpp::Fix_Base::rshift_and_apply_q_mode().
| int itpp::Stat::n_overflows | ( | ) | const [inline] |
| int itpp::Stat::n_samples | ( | ) | const [inline] |
| int itpp::Stat::n_zeros | ( | ) | const [inline] |
| double itpp::Stat::avg | ( | ) | const [inline] |
Average over all samples.
Definition at line 89 of file stat.h.
References _n_samples, and _sum.
Referenced by sigma().
| double itpp::Stat::max | ( | ) | const [inline] |
| double itpp::Stat::min | ( | ) | const [inline] |
| double itpp::Stat::sigma | ( | ) | const [inline] |
Standard deviation of all samples.
Definition at line 95 of file stat.h.
References _n_samples, _sqr_sum, avg(), and itpp::sqrt().
| double itpp::Stat::sqr_sum | ( | ) | const [inline] |
| double itpp::Stat::sum | ( | ) | const [inline] |
| vec itpp::Stat::histogram | ( | ) | const [inline] |
int itpp::Stat::_n_overflows [protected] |
Number of reported overflows.
Definition at line 109 of file stat.h.
Referenced by clear(), n_overflows(), and sample().
int itpp::Stat::_n_samples [protected] |
int itpp::Stat::_n_zeros [protected] |
double itpp::Stat::_max [protected] |
double itpp::Stat::_min [protected] |
double itpp::Stat::_sqr_sum [protected] |
double itpp::Stat::_sum [protected] |
Generated on Wed Apr 18 11:23:40 2007 for IT++ by Doxygen 1.5.2