moving_average.cpp File Reference

Implementation of moving average functions. More...

#include "stdafx.h"
#include "moving_average.h"
#include "date_func.h"
#include "station_base.h"

Go to the source code of this file.

Functions

template<class Titem >
void RunAverages ()
 Run moving average decrease function on all items from a pool which are due this tick.
template void RunAverages< Station > ()

Detailed Description

Implementation of moving average functions.

Definition in file moving_average.cpp.


Function Documentation

template<class Titem >
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.


Generated on Fri May 27 04:19:56 2011 for OpenTTD by  doxygen 1.6.1