28 #include "mirtk/OrderedSet.h" 39 if (values.size() > 1) {
40 OrderedSet<double>::const_iterator j = values.begin();
41 OrderedSet<double>::const_iterator i = j++;
42 for (; j != values.end(); ++i, ++j) avg += (*j) - (*i);
43 avg /= (values.size() - 1);
51 #endif // MIRTK_Utils_H
double AverageInterval(const OrderedSet< double > &values)
Get average interval between consecutive values of an ordered set.