Detailed Description
Go to the source code of this file.
Macros | |
| #define | GCG_DECL_SORTINDCOMP(x) |
| #define | GCG_DECL_SORTPTRCOMP(x) |
Functions | |
| GCG_EXPORT void | GCGsortPtr (void **ptrarray, GCG_DECL_SORTPTRCOMP((*ptrcomp)), void *userdata, int len) |
| GCG_EXPORT void | GCGsortPtrPtr (void **ptrarray1, void **ptrarray2, GCG_DECL_SORTPTRCOMP((*ptrcomp)), void *userdata, int len) |
Macro Definition Documentation
◆ GCG_DECL_SORTINDCOMP
| #define GCG_DECL_SORTINDCOMP | ( | x | ) |
compares two element indices result: < 0: ind1 comes before (is better than) ind2 = 0: both indices have the same value
0: ind2 comes after (is worse than) ind2
Definition at line 52 of file gcgsort.h.
Referenced by GCGSORTTPL_NAME(), GCGSORTTPL_NAME(), GCGSORTTPL_NAME(), and GCGSORTTPL_NAME().
◆ GCG_DECL_SORTPTRCOMP
| #define GCG_DECL_SORTPTRCOMP | ( | x | ) |
compares two data element pointers result: < 0: elem1 comes before (is better than) elem2 = 0: both elements have the same value
0: elem2 comes after (is worse than) elem2
Definition at line 60 of file gcgsort.h.
Referenced by GCG_DECL_SORTPTRCOMP(), GCG_DECL_SORTPTRCOMP(), GCGsortPtr(), GCGsortPtrPtr(), GCGSORTTPL_NAME(), GCGSORTTPL_NAME(), GCGSORTTPL_NAME(), and GCGSORTTPL_NAME().
Function Documentation
◆ GCGsortPtr()
| GCG_EXPORT void GCGsortPtr | ( | void ** | ptrarray, |
| GCG_DECL_SORTPTRCOMP((*ptrcomp)) | , | ||
| void * | userdata, | ||
| int | len ) |
- Parameters
-
ptrarray pointer array to be sorted - data element comparator userdata userdata that is supplied to the comparator function len length of array
References GCG_DECL_SORTPTRCOMP, GCG_EXPORT, and GCGsortPtr().
Referenced by GCGsortPtr(), and LexicographicSort().
◆ GCGsortPtrPtr()
| GCG_EXPORT void GCGsortPtrPtr | ( | void ** | ptrarray1, |
| void ** | ptrarray2, | ||
| GCG_DECL_SORTPTRCOMP((*ptrcomp)) | , | ||
| void * | userdata, | ||
| int | len ) |
sort of two joint arrays of pointers/pointers, sorted by first array in non-decreasing order
- Parameters
-
ptrarray1 first pointer array to be sorted ptrarray2 second pointer array to be permuted in the same way - data element comparator userdata userdata that is supplied to the comparator function len length of arrays
References GCG_DECL_SORTPTRCOMP, and GCGsortPtrPtr().
Referenced by GCGsortPtrPtr(), and GCGtransformMastersolToOrigsol().