◆ SimpleMovingAverage()
void SimpleMovingAverage |
( |
int | pSize, |
|
|
T | pDefaultValue = 0 ) |
|
inlineprivate |
Initialize Simple Moving Average Cyclic Buffer.
- Аргументы
-
pSize | size of the buffer |
pDefaultValue | initial value stored in buffer |
14 {
16
18 {
21 }
22 }
T m_Sum
Definition SimpleMovingAverage.c:3
ref array< T > m_Samples
Definition SimpleMovingAverage.c:6
int m_Size
Definition SimpleMovingAverage.c:5
◆ Add()
Add new value and return average value from buffer.
- Аргументы
-
newSample | value that will be added to buffer |
- Возвращает
- average value from the buffer
34 {
38 {
40 }
41
43 }
int m_Pointer
Definition SimpleMovingAverage.c:4
◆ GetSamples()
Returns all the samples stored in the buffer.
◆ m_Pointer
◆ m_Samples
◆ m_Size
◆ m_Sum
Объявления и описания членов класса находятся в файле: