Loading...
Searching...
No Matches
gcgsorttpl.c
Go to the documentation of this file.
36/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
39 * #define GCGSORTTPL_NAMEEXT <ext> extension to be used for SCIP method names, for example DownIntRealPtr
41 * #define GCGSORTTPL_FIELD1TYPE <type> data type of first additional array which should be sorted in the same way (optional)
42 * #define GCGSORTTPL_FIELD2TYPE <type> data type of second additional array which should be sorted in the same way (optional)
43 * #define GCGSORTTPL_FIELD3TYPE <type> data type of third additional array which should be sorted in the same way (optional)
44 * #define GCGSORTTPL_FIELD4TYPE <type> data type of fourth additional array which should be sorted in the same way (optional)
45 * #define GCGSORTTPL_FIELD5TYPE <type> data type of fifth additional array which should be sorted in the same way (optional)
46 * #define GCGSORTTPL_FIELD6TYPE <type> data type of fifth additional array which should be sorted in the same way (optional)
196 GCGSORTTPL_HASFIELD1PAR( GCGSORTTPL_FIELD1TYPE* field1 ) /**< additional field that should be sorted in the same way */
197 GCGSORTTPL_HASFIELD2PAR( GCGSORTTPL_FIELD2TYPE* field2 ) /**< additional field that should be sorted in the same way */
198 GCGSORTTPL_HASFIELD3PAR( GCGSORTTPL_FIELD3TYPE* field3 ) /**< additional field that should be sorted in the same way */
199 GCGSORTTPL_HASFIELD4PAR( GCGSORTTPL_FIELD4TYPE* field4 ) /**< additional field that should be sorted in the same way */
200 GCGSORTTPL_HASFIELD5PAR( GCGSORTTPL_FIELD5TYPE* field5 ) /**< additional field that should be sorted in the same way */
201 GCGSORTTPL_HASFIELD6PAR( GCGSORTTPL_FIELD6TYPE* field6 ) /**< additional field that should be sorted in the same way */
204 GCGSORTTPL_HASINDCOMPPAR( void* dataptr ) /**< pointer to data field that is given to the external compare method */
263 GCGSORTTPL_HASFIELD1PAR( GCGSORTTPL_FIELD1TYPE* field1 ) /**< additional field that should be sorted in the same way */
264 GCGSORTTPL_HASFIELD2PAR( GCGSORTTPL_FIELD2TYPE* field2 ) /**< additional field that should be sorted in the same way */
265 GCGSORTTPL_HASFIELD3PAR( GCGSORTTPL_FIELD3TYPE* field3 ) /**< additional field that should be sorted in the same way */
266 GCGSORTTPL_HASFIELD4PAR( GCGSORTTPL_FIELD4TYPE* field4 ) /**< additional field that should be sorted in the same way */
267 GCGSORTTPL_HASFIELD5PAR( GCGSORTTPL_FIELD5TYPE* field5 ) /**< additional field that should be sorted in the same way */
268 GCGSORTTPL_HASFIELD6PAR( GCGSORTTPL_FIELD6TYPE* field6 ) /**< additional field that should be sorted in the same way */
271 GCGSORTTPL_HASINDCOMPPAR( void* dataptr ) /**< pointer to data field that is given to the external compare method */
275 SCIP_Bool type /**< TRUE, if quick-sort should start with with key[lo] < pivot <= key[hi], key[lo] <= pivot < key[hi] otherwise */
337 /* everything is greater or equal than the pivot element: move pivot to the left (degenerate case) */
338 assert(!GCGSORTTPL_ISBETTER(key[mid], pivotkey)); /* the pivot element did not change its position */
358 /* everything is greater or equal than the pivot element: move pivot to the left (degenerate case) */
359 assert(!GCGSORTTPL_ISBETTER(key[mid], pivotkey)); /* the pivot element did not change its position */
446 GCGSORTTPL_HASINDCOMPPAR( void* dataptr ) /**< pointer to data field that is given to the external compare method */
460/** SCIPsort...(): sorts array 'key' and performs the same permutations on the additional 'field' arrays */
464 GCGSORTTPL_HASFIELD1PAR( GCGSORTTPL_FIELD1TYPE* field1 ) /**< additional field that should be sorted in the same way */
465 GCGSORTTPL_HASFIELD2PAR( GCGSORTTPL_FIELD2TYPE* field2 ) /**< additional field that should be sorted in the same way */
466 GCGSORTTPL_HASFIELD3PAR( GCGSORTTPL_FIELD3TYPE* field3 ) /**< additional field that should be sorted in the same way */
467 GCGSORTTPL_HASFIELD4PAR( GCGSORTTPL_FIELD4TYPE* field4 ) /**< additional field that should be sorted in the same way */
468 GCGSORTTPL_HASFIELD5PAR( GCGSORTTPL_FIELD5TYPE* field5 ) /**< additional field that should be sorted in the same way */
469 GCGSORTTPL_HASFIELD6PAR( GCGSORTTPL_FIELD6TYPE* field6 ) /**< additional field that should be sorted in the same way */
472 GCGSORTTPL_HASINDCOMPPAR( void* dataptr ) /**< pointer to data field that is given to the external compare method */
531 GCGSORTTPL_HASFIELD1PAR( GCGSORTTPL_FIELD1TYPE* field1 ) /**< additional field that should be sorted in the same way */
532 GCGSORTTPL_HASFIELD2PAR( GCGSORTTPL_FIELD2TYPE* field2 ) /**< additional field that should be sorted in the same way */
533 GCGSORTTPL_HASFIELD3PAR( GCGSORTTPL_FIELD3TYPE* field3 ) /**< additional field that should be sorted in the same way */
534 GCGSORTTPL_HASFIELD4PAR( GCGSORTTPL_FIELD4TYPE* field4 ) /**< additional field that should be sorted in the same way */
535 GCGSORTTPL_HASFIELD5PAR( GCGSORTTPL_FIELD5TYPE* field5 ) /**< additional field that should be sorted in the same way */
536 GCGSORTTPL_HASFIELD6PAR( GCGSORTTPL_FIELD6TYPE* field6 ) /**< additional field that should be sorted in the same way */
539 GCGSORTTPL_HASINDCOMPPAR( void* dataptr ) /**< pointer to data field that is given to the external compare method */
579/** SCIPsortedvecDelPos...(): deletes an element at a given position from a sorted multi-vector */
583 GCGSORTTPL_HASFIELD1PAR( GCGSORTTPL_FIELD1TYPE* field1 ) /**< additional field that should be sorted in the same way */
584 GCGSORTTPL_HASFIELD2PAR( GCGSORTTPL_FIELD2TYPE* field2 ) /**< additional field that should be sorted in the same way */
585 GCGSORTTPL_HASFIELD3PAR( GCGSORTTPL_FIELD3TYPE* field3 ) /**< additional field that should be sorted in the same way */
586 GCGSORTTPL_HASFIELD4PAR( GCGSORTTPL_FIELD4TYPE* field4 ) /**< additional field that should be sorted in the same way */
587 GCGSORTTPL_HASFIELD5PAR( GCGSORTTPL_FIELD5TYPE* field5 ) /**< additional field that should be sorted in the same way */
588 GCGSORTTPL_HASFIELD6PAR( GCGSORTTPL_FIELD6TYPE* field6 ) /**< additional field that should be sorted in the same way */
591 GCGSORTTPL_HASINDCOMPPAR( void* dataptr ) /**< pointer to data field that is given to the external compare method */
616/* The SCIPsortedvecFind...() method only has needs the key array but not the other field arrays. In order to
617 * avoid defining the same method multiple times, only include this method if we do not have any additional fields.
621/** SCIPsortedvecFind...(): Finds the position at which 'val' is located in the sorted vector by binary search.
622 * If the element exists, the method returns TRUE and stores the position of the element in '*pos'.
623 * If the element does not exist, the method returns FALSE and stores the position of the element that follows
624 * 'val' in the ordering in '*pos', i.e., '*pos' is the position at which 'val' would be inserted.
625 * Note that if the element is not found, '*pos' may be equal to len if all existing elements are smaller than 'val'.
632 GCGSORTTPL_HASINDCOMPPAR( void* dataptr ) /**< pointer to data field that is given to the external compare method */
SCIP_VAR * h
#define SCIP_Bool
#define TRUE
#define FALSE
static assert(heur !=NULL)
#define NULL