GCG 4.1.1 (dev)

Generic Column Generation

Loading...
Searching...
No Matches

Detailed Description

Functions

GCG_EXPORT SCIP_RETCODE GCGpqueueCreate (SCIP *scip, GCG_PQUEUE **pqueue, int initsize, SCIP_DECL_SORTPTRCOMP((*ptrcomp)), GCG_LOCK *memorylock)
GCG_EXPORT void GCGpqueueFree (GCG_PQUEUE **pqueue)
GCG_EXPORT void GCGpqueueClear (GCG_PQUEUE *pqueue)
GCG_EXPORT SCIP_RETCODE GCGpqueueInsert (GCG_PQUEUE *pqueue, void *elem)
GCG_EXPORT void * GCGpqueueRemove (GCG_PQUEUE *pqueue)
GCG_EXPORT SCIP_RETCODE GCGpqueueResort (GCG_PQUEUE *pqueue)
GCG_EXPORT SCIP_RETCODE GCGpqueueSetComperator (GCG_PQUEUE *pqueue,)
GCG_EXPORT SCIP_RETCODE GCGpqueueDelete (GCG_PQUEUE *pqueue, int pos, void **elem)
GCG_EXPORT void * GCGpqueueFirst (GCG_PQUEUE *pqueue)
GCG_EXPORT int GCGpqueueNElems (GCG_PQUEUE *pqueue)
GCG_EXPORT void ** GCGpqueueElems (GCG_PQUEUE *pqueue)

Function Documentation

◆ GCGpqueueCreate()

GCG_EXPORT SCIP_RETCODE GCGpqueueCreate ( SCIP * scip,
GCG_PQUEUE ** pqueue,
int initsize,
SCIP_DECL_SORTPTRCOMP((*ptrcomp)) ,
GCG_LOCK * memorylock )

creates priority queue

Parameters
scipSCIP data structure
pqueuepointer to a priority queue
initsizeinitial number of available element slots
-data element comparator
memorylockmemory lock

Definition at line 124 of file gcgpqueue.c.

References assert(), GCG_LOCK, GCGpqueueCreate(), pqueueResize(), and SCIP_CALL().

Referenced by GCGpqueueCreate(), and gcg::Pricingcontroller::initSol().

◆ GCGpqueueFree()

GCG_EXPORT void GCGpqueueFree ( GCG_PQUEUE ** pqueue)

frees priority queue, but not the data elements themselves

Parameters
pqueuepointer to a priority queue

Definition at line 152 of file gcgpqueue.c.

References assert(), and GCGpqueueFree().

Referenced by gcg::Pricingcontroller::exitSol(), and GCGpqueueFree().

◆ GCGpqueueClear()

GCG_EXPORT void GCGpqueueClear ( GCG_PQUEUE * pqueue)

clears the priority queue, but doesn't free the data elements themselves

Parameters
pqueuepriority queue

Definition at line 163 of file gcgpqueue.c.

References assert(), GCGpqueueClear(), and GCG_PQueue::len.

Referenced by GCGpqueueClear(), and gcg::Pricingcontroller::setupPriorityQueue().

◆ GCGpqueueInsert()

GCG_EXPORT SCIP_RETCODE GCGpqueueInsert ( GCG_PQUEUE * pqueue,
void * elem )

inserts element into priority queue

Parameters
pqueuepriority queue
elemelement to be inserted

Definition at line 173 of file gcgpqueue.c.

References assert(), GCGpqueueInsert(), GCG_PQueue::len, PQ_PARENT, pqueueResize(), SCIP_CALL(), and GCG_PQueue::slots.

Referenced by gcg::Pricingcontroller::evaluatePricingjob(), GCGpqueueInsert(), and gcg::Pricingcontroller::setupPriorityQueue().

◆ GCGpqueueRemove()

GCG_EXPORT void * GCGpqueueRemove ( GCG_PQUEUE * pqueue)

removes and returns best element from the priority queue

Parameters
pqueuepriority queue

Definition at line 203 of file gcgpqueue.c.

References assert(), GCGpqueueRemove(), GCG_PQueue::len, PQ_LEFTCHILD, PQ_PARENT, PQ_RIGHTCHILD, and GCG_PQueue::slots.

Referenced by GCGpqueueRemove(), and gcg::Pricingcontroller::getNextPricingjob().

◆ GCGpqueueResort()

GCG_EXPORT SCIP_RETCODE GCGpqueueResort ( GCG_PQUEUE * pqueue)

resorts priority queue after changing the key values

Parameters
pqueuepriority queue

Definition at line 244 of file gcgpqueue.c.

References assert(), GCGpqueueResort(), GCG_PQueue::len, PQ_PARENT, pqueueHeapify(), and SCIP_CALL().

Referenced by GCGpqueueResort(), and gcg::Pricingcontroller::pricingprobNextBranchcons().

◆ GCGpqueueSetComperator()

GCG_EXPORT SCIP_RETCODE GCGpqueueSetComperator ( GCG_PQUEUE * pqueue)

set the comperator of the priority queue delete item at position pos and insert last item at this position and resort pqueue

set the comperator of the priority queue

Parameters
pqueuepriority queue data element comparator

Definition at line 271 of file gcgpqueue.c.

References GCGpqueueSetComperator().

Referenced by GCGpqueueSetComperator().

◆ GCGpqueueDelete()

GCG_EXPORT SCIP_RETCODE GCGpqueueDelete ( GCG_PQUEUE * pqueue,
int pos,
void ** elem )

< delete item at position pos and insert last item at this position and resort pqueue

Parameters
pqueuepriority queue
posposition of item that should be deleted
elempointer to store element that was deleted from pqueue

Definition at line 284 of file gcgpqueue.c.

References assert(), GCGpqueueDelete(), GCG_PQueue::len, PQ_LEFTCHILD, PQ_PARENT, PQ_RIGHTCHILD, and GCG_PQueue::slots.

Referenced by GCGpqueueDelete().

◆ GCGpqueueFirst()

GCG_EXPORT void * GCGpqueueFirst ( GCG_PQUEUE * pqueue)

returns the best element of the queue without removing it

Parameters
pqueuepriority queue

Definition at line 323 of file gcgpqueue.c.

References assert(), GCGpqueueFirst(), GCG_PQueue::len, and GCG_PQueue::slots.

Referenced by GCGpqueueFirst().

◆ GCGpqueueNElems()

GCG_EXPORT int GCGpqueueNElems ( GCG_PQUEUE * pqueue)

returns the number of elements in the queue

Parameters
pqueuepriority queue

Definition at line 337 of file gcgpqueue.c.

References assert(), GCGpqueueNElems(), and GCG_PQueue::len.

Referenced by GCGpqueueNElems().

◆ GCGpqueueElems()

GCG_EXPORT void ** GCGpqueueElems ( GCG_PQUEUE * pqueue)

returns the elements of the queue; changing the returned array may destroy the queue's ordering!

Parameters
pqueuepriority queue

Definition at line 348 of file gcgpqueue.c.

References assert(), GCGpqueueElems(), GCG_PQueue::len, and GCG_PQueue::slots.

Referenced by GCGpqueueElems().