Averager
Name
Averager -- Averages together data, gives the data to whomever asks.
Description
Averager objects read a value (via a MessageProbe) from a collection (typically a list) of objects and collect statistics over them.
Methods
Phase: Creating
-
setWidth: (unsigned)
width Set sampling width for target.
-
setCollection: aTarget Sets the collection of objects that will be probed.
Phase: Using
- (unsigned)
getCount The getCount method returns the number of values the averager collects.
- (double)
getMin The getMin method returns the minimum value the averager collects. The value is read out of the object, not computed everytime it is asked for.
- (double)
getTotal The getTotal method sums the values the averager collects. The value is read out of the object, not computed everytime it is asked for.
- (double)
getMovingStdDev The returns the square root of -getMovingVariance.
- (double)
getStdDev The returns the square root of -getVariance.
- (double)
getMovingVariance The returns the unbiased estimate of sample variance using the specified sampling width.
- (double)
getVariance The returns the unbiased estimate of sample variance per the `corrected' formula (Hays, Statistics 3rd ed, p. 188).
- (double)
getMovingAverage The getMovingAverage method averages the values the averager collects using the specified sampling width.
- (double)
getAverage The getAverage method averages the values the averager collects. The total and count are read out of the object to compute the average.
- (void)
update The update method runs through the collection calling the selector on each object.