gcgpqueue.c
Go to the documentation of this file.
36 /*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
102 if( brotherpos < pqueue->len && (*pqueue->ptrcomp)(pqueue->slots[brotherpos], pqueue->slots[childpos]) < 0 )
177 /* insert element as leaf in the tree, move it towards the root as long it is better than its parent */
209 /* remove root element of the tree, move the better child to its parents position until the last element
220 if( brotherpos <= pqueue->len && (*pqueue->ptrcomp)(pqueue->slots[brotherpos], pqueue->slots[childpos]) < 0 )
289 /* remove element at position pos of the tree, move the better child to its parents position until the last element
299 if( brotherpos <= pqueue->len && (*pqueue->ptrcomp)(pqueue->slots[brotherpos], pqueue->slots[childpos]) < 0 )
GCG interface methods.
static SCIP_RETCODE pqueueResize(GCG_PQUEUE *pqueue, int minsize)
Definition: gcgpqueue.c:61
SCIP_RETCODE GCGpqueueDelete(GCG_PQUEUE *pqueue, int pos, void **elem)
Definition: gcgpqueue.c:274
SCIP_RETCODE GCGpqueueCreate(SCIP *scip, GCG_PQUEUE **pqueue, int initsize, SCIP_DECL_SORTPTRCOMP((*ptrcomp)))
Definition: gcgpqueue.c:118
static SCIP_RETCODE pqueueHeapify(GCG_PQUEUE *pqueue, int pos)
Definition: gcgpqueue.c:81
private methods for working with priority queue
SCIP_RETCODE GCGpqueueInsert(GCG_PQUEUE *pqueue, void *elem)
Definition: gcgpqueue.c:163
SCIP_RETCODE GCGpqueueSetComperator(GCG_PQUEUE *pqueue, SCIP_DECL_SORTPTRCOMP((*ptrcomp)))
Definition: gcgpqueue.c:261