Facility for calculating simple sample statistics without having full sample available.
More...
#include <RunningStatistics.hpp>
|
| template<class Serializer> |
| void | serializeOp (Serializer &serializer) |
| | Convert between byte array and object representation.
|
| bool | operator== (const RunningStatistics &that) const |
| | Equality predicate.
|
|
void | reset () |
| | Reset internal counters to prepare for calculating a new set of sample statistics.
|
| void | addSamplePoint (const Scalar x) |
| | Include new element into sample.
|
| std::size_t | sampleSize () const |
| | Retrieve current sample size.
|
|
Scalar | min () const |
| | Retrieve smallest sample value seen so far.
|
|
Scalar | max () const |
| | Retrieve largest sample value seen so far.
|
|
Scalar | mean () const |
| | Retrieve arithmetic average of all sample points seen so far.
|
| std::optional< Scalar > | stdev () const |
| | Retrieve unbiased standard deviation of all sample points seen so far.
|
|
|
static RunningStatistics | serializationTestObject () |
| | Create a serialisation test object.
|
template<typename Scalar>
class Opm::RunningStatistics< Scalar >
Facility for calculating simple sample statistics without having full sample available.
- Template Parameters
-
| Scalar | Sample element type. Typically a built-in arithmetic type like float or double. |
◆ addSamplePoint()
template<typename Scalar>
Include new element into sample.
Updates internal statistics counters.
- Parameters
-
◆ operator==()
template<typename Scalar>
Equality predicate.
- Parameters
-
| [in] | that | Object against which will be tested for equality. |
- Returns
- Whether or not is the same as
that.
◆ sampleSize()
template<typename Scalar>
Retrieve current sample size.
Effectively returns the number of calls to addSamplePoint() since object was constructed or since the previous call to reset().
◆ serializeOp()
template<typename Scalar>
template<class Serializer>
Convert between byte array and object representation.
- Template Parameters
-
| Serializer | Byte array conversion protocol. |
- Parameters
-
| [in,out] | serializer | Byte array conversion object. |
◆ stdev()
template<typename Scalar>
Retrieve unbiased standard deviation of all sample points seen so far.
Returns nullopt if number of sample points is less than two.
The documentation for this class was generated from the following file: