Bites
A small library of miscellaneous C++ codes.
 All Classes Namespaces Functions Friends Pages
Public Member Functions | List of all members
bites::Averager Class Reference

#include <Averager.hpp>

Public Member Functions

 Averager (const int &max_count)
 
float add (const float &value)
 
int length ()
 

Detailed Description

Keeps a running average with limited history.

Constructor & Destructor Documentation

bites::Averager::Averager ( const int &  max_count)

The constructor initializes the averager with maximum number of (latest) samples to keep.

Member Function Documentation

float bites::Averager::add ( const float &  value)

Add a value, and return current average.

int bites::Averager::length ( )

Return number of samples.


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