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, const size_t sample_size) | |
void | clear (const T initial_value) |
void | set_sample_size (const size_t sample_size) |
void | add (const T new_value) |
T | value () const |
add_insert_iterator | input () |
Pseudo Moving Average For floating point types.
T | The sample value type. |
|
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 |
Sets the sample size.
sample_size | The new sample size. |
|
inline |
Gets the current pseudo moving average.