#include <qx/easing/easing_functions.h>
#include <deque>
#include <vector>
#include <qx/stat/moving_average.inl>
Go to the source code of this file.
- Author
- Khrapov
- Date
- 1.06.2021
- Copyright
- © Nick Khrapov, 2021. All right reserved.
Definition in file moving_average.h.
◆ get_moving_average_exp_weights()
template<class T >
std::vector< T > qx::get_moving_average_exp_weights |
( |
size_t |
nEntries | ) |
|
|
inline |
Generate weights for moving_average with exponential decrease, from highest weight for the most recent data, down to zero.
- Template Parameters
-
T | - floating point ish type |
- Parameters
-
nEntries | - number of entries in moving_average |
- Return values
-
Definition at line 33 of file moving_average.inl.
◆ get_moving_average_linear_weights()
template<class T >
std::vector< T > qx::get_moving_average_linear_weights |
( |
size_t |
nEntries | ) |
|
|
inline |
Generate weights for moving_average with linearly decrease, from highest weight for the most recent data, down to zero.
- Template Parameters
-
T | - floating point ish type |
- Parameters
-
nEntries | - number of entries in moving_average |
- Return values
-
Definition at line 20 of file moving_average.inl.
◆ get_moving_average_simple_weights()
template<class T >
std::vector< T > qx::get_moving_average_simple_weights |
( |
size_t |
nEntries | ) |
|
|
inline |
Generate weights for moving_average as arithmetic mean.
- Template Parameters
-
T | - floating point ish type |
- Parameters
-
nEntries | - number of entries in moving_average |
- Return values
-
Definition at line 14 of file moving_average.inl.