Detailed Description
sorting functions, adapted from SCIP's sorttpl to include userdata
Definition in file gcgsort.h.
#include "scip/scip.h"
Go to the source code of this file.
Macros | |
#define | GCG_DECL_SORTINDCOMP(x) int x (void* userdata, void* dataptr, int ind1, int ind2) |
#define | GCG_DECL_SORTPTRCOMP(x) int x (void* userdata, void* elem1, void* elem2) |
Functions | |
SCIP_EXPORT void | GCGsortPtr (void **ptrarray, GCG_DECL_SORTPTRCOMP((*ptrcomp)), void *userdata, int len) |
SCIP_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 | ) | int x (void* userdata, void* dataptr, int ind1, int ind2) |
◆ GCG_DECL_SORTPTRCOMP
#define GCG_DECL_SORTPTRCOMP | ( | x | ) | int x (void* userdata, void* elem1, void* elem2) |
Function Documentation
◆ GCGsortPtr()
SCIP_EXPORT void GCGsortPtr | ( | void ** | ptrarray, |
GCG_DECL_SORTPTRCOMP((*ptrcomp)) | , | ||
void * | userdata, | ||
int | len | ||
) |
- Parameters
-
ptrarray pointer array to be sorted userdata userdata that is supplied to the comparator function len length of array
Referenced by LexicographicSort().
◆ GCGsortPtrPtr()
SCIP_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 userdata userdata that is supplied to the comparator function len length of arrays
Referenced by GCGtransformMastersolToOrigsol().