Class to get a convergence value as mean over various time steps.
More...
#include <mia/core/convergence_measure.hh>
Class to get a convergence value as mean over various time steps.
This class can is used to measure the mean of a value over a user-defined number of steps.
Definition at line 42 of file convergence_measure.hh.
◆ CConvergenceMeasure()
mia::CConvergenceMeasure::CConvergenceMeasure |
( |
uint32_t |
size | ) |
|
Contruct the class by giving the number of steps the measure should be averaged over.
- Parameters
-
size | default number of steps to take into account |
◆ fill()
uint32_t mia::CConvergenceMeasure::fill |
( |
| ) |
const |
- Returns
- the number of values currently in the buffer
◆ is_full_size()
bool mia::CConvergenceMeasure::is_full_size |
( |
| ) |
const |
- Returns
- whether the buffer is at maximal expected capacity
◆ push()
void mia::CConvergenceMeasure::push |
( |
double |
value | ) |
|
Add a new value to the measure. If the maximum number of values is already in consideration, the oldest value will be dropped.
◆ rate()
double mia::CConvergenceMeasure::rate |
( |
| ) |
const |
- Returns
- the (linear) rate of change as linear regression of the values currently in the buffer.
◆ value()
double mia::CConvergenceMeasure::value |
( |
| ) |
const |
- Returns
- current average of the measure
The documentation for this class was generated from the following file: