mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
Add unittests for finding the third quartile of a set.
This commit is contained in:
committed by
Nick Mathewson
parent
8e39395199
commit
01800ea1e4
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user