A RollingAverage that stores a copy of each record. and does the math when queried.
More...
#include <rollingaverage.h>
|
typedef RecordType | Type |
| Used for accessing the derived type when it may not be directly known.
|
|
typedef RecordType | Type |
| Used for accessing the derived type when it may not be directly known.
|
|
|
std::vector< RecordType >::iterator | Current |
| The iterator used to treat an std::vector as a circular buffer.
|
|
std::vector< RecordType > | Records |
| The collection of all the records that are being have been added going back as far as the capacity will allow. More...
|
|
template<typename RecordType>
class Mezzanine::BufferedRollingAverage< RecordType >
A RollingAverage that stores a copy of each record. and does the math when queried.
Definition at line 97 of file rollingaverage.h.
template<typename RecordType >
Constructor.
- Parameters
-
RecordCount | The capacity of the Rolling average. This defaults to 10. |
Definition at line 120 of file rollingaverage.h.
template<typename RecordType >
Copy constructor, performs deep copy.
- Parameters
-
Rhs | The Rolling average to copy. |
Definition at line 150 of file rollingaverage.h.
template<typename RecordType >
Add up all the records and divide by the count. A simple arithmetic mean.
- Returns
- This returns the current average of all the records as a RecordType. If it is an Integer type floating parts are truncated.
Implements Mezzanine::RollingAverage< RecordType >.
Definition at line 140 of file rollingaverage.h.
template<typename RecordType >
template<typename RecordType >
Assignment operator, performs deep copy.
- Parameters
-
Rhs | The Rolling average to copy. |
- Returns
- A reference to this rolling average after assignment has occurred, to allow for operator chaining.
Definition at line 159 of file rollingaverage.h.
template<typename RecordType >
template<typename RecordType >
template<typename RecordType >
The collection of all the records that are being have been added going back as far as the capacity will allow.
- Note
- All writes to this are performed through the iterator Current
Definition at line 102 of file rollingaverage.h.
The documentation for this class was generated from the following file: