|
faunus
|
Class to collect averages and standard deviation. More...
#include <average.h>


Public Member Functions | |
| void | clear () |
| Clear all data. | |
| auto | rms () const |
| Root-mean-square. | |
| auto | rsd () const |
| Relative standard deviation or coefficient of variation. | |
| value_type | stdev () const |
| Standard deviation. | |
| void | add (const value_type value) |
| Add value to average. More... | |
| AverageStdev & | operator+= (const value_type value) |
| Add value to average. More... | |
| bool | operator== (const AverageStdev &other) const |
| AverageStdev & | operator= (const value_type value) |
| Clear and assign a new value. | |
| AverageStdev & | operator<< (std::istream &stream) |
| template<class Archive > | |
| void | serialize (AverageStdev &archive) |
Public Member Functions inherited from Faunus::Average< value_type, counter_type > | |
| void | clear () |
| Clear all data. | |
| bool | empty () const |
| True if empty. | |
| auto | size () const |
| Number of samples. | |
| auto | avg () const |
| Average. | |
| operator value_type () const | |
| Static cast operator. | |
| bool | operator< (const Average &other) const |
| Compare means. | |
| operator bool () const | |
| Check if not empty. | |
| void | add (const value_type value) |
| Add value to average. More... | |
| Average & | operator+= (const value_type value) |
| Add value to average. More... | |
| bool | operator== (const Average &other) const |
| Average & | operator= (const value_type value) |
| Clear and assign a new value. | |
| auto | operator+ (const Average &other) const |
| Merge two averages with correct weights. More... | |
| Average & | operator<< (std::istream &stream) |
| template<class Archive > | |
| void | serialize (Archive &archive) |
Friends | |
| std::ostream & | operator<< (std::ostream &stream, const AverageStdev &average) |
Additional Inherited Members | |
Protected Attributes inherited from Faunus::Average< value_type, counter_type > | |
| counter_type | number_of_samples = 0 |
| number of values in average | |
| value_type | value_sum = 0.0 |
| Sum of all recorded values. | |
Class to collect averages and standard deviation.
|
inline |
Add value to average.
| value | Value to add |
| If | counter overflow |
|
inline |
Add value to average.
| value | Value to add |
| If | overflow in either the counter, or sum of squared values |
1.8.13