OOMovingAverage.h
1 //
2 // Copyright (c) 2016 Brightcove, Inc. All rights reserved.
3 //
4 
5 #define MOVING_AVERAGE_WINDOW_SAMPLE_SIZE 10
6 
11 @interface OOMovingAverage : NSObject <NSCopying>
12 @property (nonatomic, readonly) double average;
13 @property (nonatomic, readonly) long long count;
14 -(void) mergeSample:(double)sample;
15 @end
long long count
Definition: OOMovingAverage.h:13
Keep a running average of the last N samples, where N is MOVING_AVERAGE_WINDOW_SAMPLE_SIZE.
Definition: OOMovingAverage.h:11
double average
Definition: OOMovingAverage.h:12