메소드 | 설명 | |
---|---|---|
MovingAverageCalculator ( int windowSize ) : System |
Create a new moving average calculator.
|
|
NextValue ( float nextValue ) : float |
Updates the moving average with its next value, and returns the updated average value. When IsMature is true and NextValue is called, a previous value will 'fall out' of the moving average.
|
|
Reset ( ) : void |
Clears any accumulated state and resets the calculator to its initial configuration. Calling this method is the equivalent of creating a new instance.
|
public MovingAverageCalculator ( int windowSize ) : System | ||
windowSize | int | The maximum number of values to be considered /// by this moving average calculation. |
리턴 | System |
public NextValue ( float nextValue ) : float | ||
nextValue | float | The next value to be considered within the moving average. |
리턴 | float |