22int find_nth_int(
int *array,
int n_elements,
int nth);
23time_t find_nth_time(time_t *array,
int n_elements,
int nth);
24double find_nth_double(
double *array,
int n_elements,
int nth);
25int32_t find_nth_int32(int32_t *array,
int n_elements,
int nth);
26uint32_t find_nth_uint32(uint32_t *array,
int n_elements,
int nth);
27long find_nth_long(
long *array,
int n_elements,
int nth);
29median_int(
int *array,
int n_elements)
31 return find_nth_int(array, n_elements, (n_elements-1)/2);
34median_time(time_t *array,
int n_elements)
36 return find_nth_time(array, n_elements, (n_elements-1)/2);
39median_double(
double *array,
int n_elements)
41 return find_nth_double(array, n_elements, (n_elements-1)/2);
44median_uint32(uint32_t *array,
int n_elements)
46 return find_nth_uint32(array, n_elements, (n_elements-1)/2);
49median_int32(int32_t *array,
int n_elements)
51 return find_nth_int32(array, n_elements, (n_elements-1)/2);
55third_quartile_uint32(uint32_t *array,
int n_elements)
57 return find_nth_uint32(array, n_elements, (n_elements*3)/4);
Utility macros to handle different features and behavior in different compilers.
Integer definitions used throughout Tor.