Add unittests for finding the third quartile of a set.

This commit is contained in:
George Kadianakis
2014-07-24 14:31:49 +03:00
committed by Nick Mathewson
parent 8e39395199
commit 01800ea1e4
3 changed files with 31 additions and 1 deletions
+6
View File
@@ -689,5 +689,11 @@ median_int32(int32_t *array, int n_elements)
return find_nth_int32(array, n_elements, (n_elements-1)/2);
}
static INLINE uint32_t
third_quartile_uint32(uint32_t *array, int n_elements)
{
return find_nth_uint32(array, n_elements, (n_elements*3)/4);
}
#endif