Parameters:
first | Beginning iterator for the container of elements. |
---|---|
last | Ending iterator for the container of elements. |
f | Factor of elements to trim from the lowest and highest values. |
f1 | Factor of the lowest elements to trim. |
f2 | Factor of the highest elements to trim. |
Returns:
Trimmed mean
Usage:
int s[4] = {1, 2, 3, 4};
double t1 = trimmean(s, s + 4, .05);
double t2 = trimmean(s, s + 4, .05, .025);
Header:
#include "descript.h"