Tor 0.4.9.1-alpha-dev
|
Functions for finding the n'th element of an array. More...
Go to the source code of this file.
Macros | |
#define | IMPLEMENT_ORDER_FUNC(funcname, elt_t) |
Functions for finding the n'th element of an array.
Definition in file order.c.
#define IMPLEMENT_ORDER_FUNC | ( | funcname, | |
elt_t | |||
) |
Declare a function called funcname that acts as a find_nth_FOO function for an array of type elt_t*.
NOTE: The implementation kind of sucks: It's O(n log n), whereas finding the kth element of an n-element list can be done in O(n). Then again, this implementation is not in critical path, and it is obviously correct.