Aria  2.7.5.2
ArRunningAverage Class Reference

This is a class for computing a running average of a number of elements. More...

#include <ariaUtil.h>

Public Member Functions

void add (double val)
 Adds a number.
 
 ArRunningAverage (size_t numToAverage)
 Constructor, give it the number of elements you want to average.
 
void clear (void)
 Clears the average.
 
double getAverage (void) const
 Gets the average.
 
size_t getCurrentNumAveraged (void)
 Gets the num averaged.
 
size_t getNumToAverage (void) const
 Gets the number of elements.
 
bool getUseRootMeanSquare (void)
 Gets if this is using a the root mean square average or just the normal average.
 
void setNumToAverage (size_t numToAverage)
 Sets the number of elements.
 
void setUseRootMeanSquare (bool useRootMeanSquare)
 Sets if this is using a the root mean square average or just the normal average.
 
 ~ArRunningAverage ()
 Destructor.
 

Protected Attributes

size_t myNum
 
size_t myNumToAverage
 
double myTotal
 
bool myUseRootMeanSquare
 
std::list< double > myVals
 

Detailed Description

This is a class for computing a running average of a number of elements.


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