|
Embedded Template Library 1.0
|
#include <pseudo_moving_average.h>
Public Types | |
| typedef T | value_type |
| typedef private_pseudo_moving_average::add_insert_iterator< this_t > | add_insert_iterator |
Public Member Functions | |
| pseudo_moving_average (const T initial_value) | |
| void | clear (const T initial_value) |
| void | add (const T new_value) |
| T | value () const |
| add_insert_iterator | input () |
Static Public Attributes | |
| static ETL_CONSTANT size_t | SAMPLE_SIZE = SAMPLE_SIZE_ |
Pseudo Moving Average For floating point types.
| T | The sample value type. |
| SAMPLE_SIZE | The number of samples to average over. |
|
inline |
Constructor
| initial_value | The initial value for the average. |
|
inline |
Adds a new sample to the average.
| new_value | The value to add. |
|
inline |
Clears the average.
| initial_value | The initial value for the average. |
|
inline |
Gets an iterator for input.
|
inline |
Gets the current pseudo moving average.