mia::CConvergenceMeasure Class Reference

Class to get a convergence value as mean over various time steps. More...

`#include <mia/core/convergence_measure.hh>`

## Public Member Functions

| CConvergenceMeasure (uint32_t size)
uint32_t | fill () const
bool | is_full_size () const
void | push (double value)
double | rate () const
double | value () const

## Detailed Description

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 43 of file convergence_measure.hh.

## Constructor & Destructor Documentation

## 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

## Member Function Documentation

## 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.

References value().

## 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

Referenced by push().

The documentation for this class was generated from the following file:

- convergence_measure.hh