Utility class for moving averages. More...
#include "settings_type.h"
#include "core/math_func.hpp"
Go to the source code of this file.
Data Structures | |
class | MovingAverage< Tvalue > |
Class implementing moving average functionality. More... | |
Functions | |
template<class Titem > | |
void | RunAverages () |
Run moving average decrease function on all items from a pool which are due this tick. |
Utility class for moving averages.
Definition in file moving_average.h.
void RunAverages | ( | ) | [inline] |
Run moving average decrease function on all items from a pool which are due this tick.
This function expects to be run every tick. It calls a method "RunAverages()" on all items for which id % DAY_TICKS == _tick_counter % DAY_TICKS. So each item is called once a day.
Definition at line 23 of file moving_average.cpp.
References _tick_counter, and DAY_TICKS.