- Inherits From:
- SwarmObject
- Declared In:
- MovingAverage.h
int width;
int numInputs;
double *maInputs;
int arrayPosition;
double sumOfInputs;
double uncorrectedSum;
double expWMA;
double aweight, bweight;
width number of observations used for a fixed interval moving average numInputs number of observations that have already been inserted maInputs historical inputs are kept in this array. arrayPosition element of maInputs that has been most recently inserted sumOfInputs sum of the last 'width' inputs uncorrectedSum sum of all inputs since object was created expWMA No description. bweight Weights used to calculate exponentially weighted moving averages. These depend on the specified 'width' according to: bweight = -expm1(-1.0/w);aweight = 1.0 - bweight; ewma=aweight*ma(x)+bweight*x
- - initWidth:
- - initWidth:Value:
- - getNumInputs
- - getMA
- - getAverage
- - getEWMA
- - addValue:
- - drop
- (void)addValue:(double)x
No method description.
- (void)drop
No method description.
- (double)getAverage
No method description.
- (double)getEWMA
No method description.
- (double)getMA
No method description.
- (int)getNumInputs
No method description.
- initWidth:(int)w
No method description.
- initWidth:(int)w Value:(double)val
No method description.