mcpele
1.0.0
The Monte Carlo Python Energy Landscape Explorer
|
#include <moving_average.h>
Public Member Functions | |
MovingAverageAcc (const std::vector< double > &time_series, const size_t nr_steps_total, const size_t nr_steps_ma) | |
double | get_mean () const |
double | get_variance () const |
size_t | get_nr_steps_ma () const |
void | shift_right () |
void | reset () |
Computes moving averages of time series. Reference to time series, from small to large times, is in m_time_series. Assume that one wants to compute moving averages for the rightmost (latest) m_nr_steps_total elements of the time series. The number of time series steps that go into one moving average is m_nr_steps_ma. The number of different moving averages that one can compute, given these two parameters (m_nr_steps_total and m_window_size) is m_nr_steps_ma. Moving average is initialised to the leftmost moving average. After that shift_right() moves the moving average window one time series step further to the right (to the future). In case shift_right() reaches the last step in the time series, the moving average window returns to the initial position.
Definition at line 26 of file moving_average.h.
mcpele::MovingAverageAcc::MovingAverageAcc | ( | const std::vector< double > & | time_series, |
const size_t | nr_steps_total, | ||
const size_t | nr_steps_ma | ||
) | [inline] |
Definition at line 36 of file moving_average.h.
double mcpele::MovingAverageAcc::get_mean | ( | ) | const [inline] |
Definition at line 56 of file moving_average.h.
size_t mcpele::MovingAverageAcc::get_nr_steps_ma | ( | ) | const [inline] |
Definition at line 58 of file moving_average.h.
double mcpele::MovingAverageAcc::get_variance | ( | ) | const [inline] |
Definition at line 57 of file moving_average.h.
void mcpele::MovingAverageAcc::reset | ( | ) | [inline] |
Definition at line 70 of file moving_average.h.
void mcpele::MovingAverageAcc::shift_right | ( | ) | [inline] |
Definition at line 59 of file moving_average.h.