gcgpqueue.c
Go to the documentation of this file.
37/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
108 if( brotherpos < pqueue->len && (*pqueue->ptrcomp)(pqueue->slots[brotherpos], pqueue->slots[childpos]) < 0 )
187 /* insert element as leaf in the tree, move it towards the root as long it is better than its parent */
219 /* remove root element of the tree, move the better child to its parents position until the last element
230 if( brotherpos <= pqueue->len && (*pqueue->ptrcomp)(pqueue->slots[brotherpos], pqueue->slots[childpos]) < 0 )
299 /* remove element at position pos of the tree, move the better child to its parents position until the last element
309 if( brotherpos <= pqueue->len && (*pqueue->ptrcomp)(pqueue->slots[brotherpos], pqueue->slots[childpos]) < 0 )
347/** returns the elements of the queue; changing the returned array may destroy the queue's ordering! */
#define MAX(x, y)
#define SCIP_CALL(x)
GCG interface methods.
static SCIP_RETCODE pqueueHeapify(GCG_PQUEUE *pqueue, int pos)
Definition: gcgpqueue.c:87
static SCIP_RETCODE pqueueResize(GCG_PQUEUE *pqueue, int minsize)
Definition: gcgpqueue.c:62
private methods for working with priority queue
SCIP_RETCODE GCGpqueueDelete(GCG_PQUEUE *pqueue, int pos, void **elem)
Definition: gcgpqueue.c:284
SCIP_RETCODE GCGpqueueInsert(GCG_PQUEUE *pqueue, void *elem)
Definition: gcgpqueue.c:173
SCIP_RETCODE GCGpqueueCreate(SCIP *scip, GCG_PQUEUE **pqueue, int initsize, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), GCG_LOCK *memorylock)
Definition: gcgpqueue.c:124
SCIP_RETCODE GCGpqueueSetComperator(GCG_PQUEUE *pqueue, SCIP_DECL_SORTPTRCOMP((*ptrcomp)))
Definition: gcgpqueue.c:271
#define SCIPfreeBlockMemoryArray(scip, ptr, num)
int SCIPcalcMemGrowSize(SCIP *scip, int num)
#define SCIPreallocBlockMemoryArray(scip, ptr, oldnum, newnum)
#define SCIPfreeBlockMemory(scip, ptr)
#define SCIPallocBlockMemory(scip, ptr)
#define NULL
SCIP_OKAY
enum SCIP_Retcode SCIP_RETCODE