![]() |
The ZX Ecosystem v5.1.0;_GUI_v3.1.0
|
Statistics computed over a series of values.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Modules | |
Overflow policies for the SimpleStats class | |
Classes | |
class | SSOvPol_ThrowExc< T > |
Overflow policy for SimpleStats that throws an exception if dataset is full. More... | |
class | SimpleStats< T, OverflowPolicy, MAXSIZE > |
Class that computes some statistics of a series of values of a given type. More... | |
class SSOvPol_ThrowExc |
Overflow policy for SimpleStats that throws an exception if dataset is full.
Definition at line 56 of file SimpleStatistics.h.
Public Member Functions | |
SSOvPol_ThrowExc (unsigned *n) | |
Default constructor. More... | |
bool | full (void) |
Exception when full. More... | |
|
inline |
Default constructor.
Definition at line 60 of file SimpleStatistics.h.
|
inline |
Exception when full.
Definition at line 63 of file SimpleStatistics.h.
class SimpleStats |
Class that computes some statistics of a series of values of a given type.
Definition at line 112 of file SimpleStatistics.h.
Public Member Functions | |
SimpleStats (void) | |
Default constructor: an empty series. More... | |
virtual | ~SimpleStats (void) |
Destructor. More... | |
void | reset (void) |
Clear the series and the statistics. More... | |
void | addDatum (T v) |
Add a new value to the series and recompute statistics. More... | |
unsigned | sampleSize (void) const noexcept |
Return the number of values in the series. More... | |
T | min (void) const noexcept |
Statistic: Minimum of the series. More... | |
T | max (void) const noexcept |
Statistic: Maximum of the series. More... | |
T | avg (void) const noexcept |
Statistic: Average of the series. More... | |
std::string | to_string (void) const noexcept |
Return a string that describes the statistics collected so far. More... | |
|
inline |
Default constructor: an empty series.
Definition at line 118 of file SimpleStatistics.h.
|
inlinevirtual |
Destructor.
Definition at line 123 of file SimpleStatistics.h.
|
inline |
Clear the series and the statistics.
Definition at line 128 of file SimpleStatistics.h.
|
inline |
Add a new value to the series and recompute statistics.
Definition at line 131 of file SimpleStatistics.h.
|
inlinenoexcept |
Return the number of values in the series.
Definition at line 151 of file SimpleStatistics.h.
|
inlinenoexcept |
Statistic: Minimum of the series.
Definition at line 154 of file SimpleStatistics.h.
|
inlinenoexcept |
Statistic: Maximum of the series.
Definition at line 157 of file SimpleStatistics.h.
|
inlinenoexcept |
Statistic: Average of the series.
Definition at line 160 of file SimpleStatistics.h.
|
inlinenoexcept |
Return a string that describes the statistics collected so far.
Definition at line 163 of file SimpleStatistics.h.
#define SIMPLESTATISTICS_ELEMENT_FOR_AVOIDING_ERROR_IN_NESTING_GROUPS_IN_DOXYGEN |
#include <SimpleStatistics.h>
Definition at line 32 of file SimpleStatistics.h.