Collection of common predicates for library sort routines. More...
Go to the source code of this file.
Macros | |
| #define | vbl_qsort_double_ascending vbl_sort_double_ascending |
| #define | vbl_qsort_double_descending vbl_sort_double_descending |
| #define | vbl_qsort_int_ascending vbl_sort_int_ascending |
| #define | vbl_qsort_int_descending vbl_sort_int_descending |
| #define | vbl_qsort_helper vbl_sort_helper |
| #define | VBL_QSORT_INSTANTIATE(T) |
| #define | VBL_QSORT_INSTANTIATE_vector(T) |
Typedefs | |
| typedef int(* | vbl_qsort_compare_t) (const void *a, const void *b) |
Functions | |
| template<class T > | |
| void | vbl_qsort_ascending (T *base, int n) |
| Sort a C array into ascending order. More... | |
| template<class T > | |
| void | vbl_qsort_descending (T *base, int n) |
| Sort a C array into descending order. More... | |
| template<class T > | |
| void | vbl_qsort_ascending (std::vector< T > &v) |
| Sort an STL vector into ascending order. More... | |
| template<class T > | |
| void | vbl_qsort_descending (std::vector< T > &v) |
| Sort an STL vector into descending order. More... | |
| template<class T > | |
| void | vbl_qsort (std::vector< T > &v, int(*compare)(T const &a, T const &b)) |
| Sort STL vector. More... | |
Collection of common predicates for library sort routines.
Modifications 971119 AWF Initial version PDA (Manchester) 23/03/2001: Tidied up the documentation Feb.2002 - Peter Vanroose - brief doxygen comment placed on single line
Definition in file vbl_qsort.h.
| #define vbl_qsort_double_ascending vbl_sort_double_ascending |
Definition at line 27 of file vbl_qsort.h.
| #define vbl_qsort_double_descending vbl_sort_double_descending |
Definition at line 28 of file vbl_qsort.h.
| #define vbl_qsort_helper vbl_sort_helper |
Definition at line 31 of file vbl_qsort.h.
| #define VBL_QSORT_INSTANTIATE | ( | T | ) |
Definition at line 84 of file vbl_qsort.h.
| #define VBL_QSORT_INSTANTIATE_vector | ( | T | ) |
Definition at line 88 of file vbl_qsort.h.
| #define vbl_qsort_int_ascending vbl_sort_int_ascending |
Definition at line 29 of file vbl_qsort.h.
| #define vbl_qsort_int_descending vbl_sort_int_descending |
Definition at line 30 of file vbl_qsort.h.
| typedef int(* vbl_qsort_compare_t) (const void *a, const void *b) |
Definition at line 33 of file vbl_qsort.h.
|
inline |
Sort STL vector.
Definition at line 79 of file vbl_qsort.h.
|
inline |
Sort a C array into ascending order.
Do this using the standard comparison operations for T, namely operator> and operator==.
Definition at line 40 of file vbl_qsort.h.
|
inline |
Sort an STL vector into ascending order.
Do this using the standard comparison operations for T, namely operator> and operator==. I know STL has a sort, but this is easier, and faster in the 21st century.
Definition at line 61 of file vbl_qsort.h.
|
inline |
Sort a C array into descending order.
Do this using the standard comparison operations for T, namely "operator>" and "operator==".
Definition at line 50 of file vbl_qsort.h.
|
inline |
Sort an STL vector into descending order.
Do this using the standard comparison operations for T, namely "operator>" and "operator==".
Definition at line 71 of file vbl_qsort.h.
1.8.15