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, SCIP_DECL_SORTPTRCOMP((*ptrcomp))) |
| 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
-
scip SCIP data structure pqueue pointer to a priority queue initsize initial number of available element slots memorylock memory lock
Definition at line 124 of file gcgpqueue.c.
References MAX, NULL, pqueueResize(), SCIP_CALL, SCIP_OKAY, and SCIPallocBlockMemory.
Referenced by gcg::Pricingcontroller::initSol().
◆ GCGpqueueFree()
| GCG_EXPORT void GCGpqueueFree | ( | GCG_PQUEUE ** | pqueue | ) |
frees priority queue, but not the data elements themselves
- Parameters
-
pqueue pointer to a priority queue
Definition at line 152 of file gcgpqueue.c.
References NULL, SCIPfreeBlockMemory, and SCIPfreeBlockMemoryArray.
Referenced by gcg::Pricingcontroller::exitSol().
◆ GCGpqueueClear()
| GCG_EXPORT void GCGpqueueClear | ( | GCG_PQUEUE * | pqueue | ) |
clears the priority queue, but doesn't free the data elements themselves
- Parameters
-
pqueue priority queue
Definition at line 163 of file gcgpqueue.c.
References GCG_PQueue::len, and NULL.
Referenced by gcg::Pricingcontroller::setupPriorityQueue().
◆ GCGpqueueInsert()
| GCG_EXPORT SCIP_RETCODE GCGpqueueInsert | ( | GCG_PQUEUE * | pqueue, |
| void * | elem | ||
| ) |
inserts element into priority queue
- Parameters
-
pqueue priority queue elem element to be inserted
Definition at line 173 of file gcgpqueue.c.
References GCG_PQueue::len, NULL, PQ_PARENT, pqueueResize(), SCIP_CALL, SCIP_OKAY, and GCG_PQueue::slots.
Referenced by gcg::Pricingcontroller::evaluatePricingjob(), and gcg::Pricingcontroller::setupPriorityQueue().
◆ GCGpqueueRemove()
| GCG_EXPORT void * GCGpqueueRemove | ( | GCG_PQUEUE * | pqueue | ) |
removes and returns best element from the priority queue
- Parameters
-
pqueue priority queue
Definition at line 203 of file gcgpqueue.c.
References GCG_PQueue::len, NULL, PQ_LEFTCHILD, PQ_PARENT, PQ_RIGHTCHILD, and GCG_PQueue::slots.
Referenced by gcg::Pricingcontroller::getNextPricingjob().
◆ GCGpqueueResort()
| GCG_EXPORT SCIP_RETCODE GCGpqueueResort | ( | GCG_PQUEUE * | pqueue | ) |
resorts priority queue after changing the key values
- Parameters
-
pqueue priority queue
Definition at line 244 of file gcgpqueue.c.
References GCG_PQueue::len, NULL, PQ_PARENT, pqueueHeapify(), SCIP_CALL, and SCIP_OKAY.
Referenced by gcg::Pricingcontroller::pricingprobNextBranchcons().
◆ GCGpqueueSetComperator()
| GCG_EXPORT SCIP_RETCODE GCGpqueueSetComperator | ( | GCG_PQUEUE * | pqueue, |
| SCIP_DECL_SORTPTRCOMP((*ptrcomp)) | |||
| ) |
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
-
pqueue priority queue
Definition at line 271 of file gcgpqueue.c.
References SCIP_OKAY.
◆ 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
-
pqueue priority queue pos position of item that should be deleted elem pointer to store element that was deleted from pqueue
Definition at line 284 of file gcgpqueue.c.
References GCG_PQueue::len, NULL, PQ_LEFTCHILD, PQ_PARENT, PQ_RIGHTCHILD, SCIP_OKAY, and GCG_PQueue::slots.
◆ GCGpqueueFirst()
| GCG_EXPORT void * GCGpqueueFirst | ( | GCG_PQUEUE * | pqueue | ) |
returns the best element of the queue without removing it
- Parameters
-
pqueue priority queue
Definition at line 323 of file gcgpqueue.c.
References GCG_PQueue::len, NULL, and GCG_PQueue::slots.
◆ GCGpqueueNElems()
| GCG_EXPORT int GCGpqueueNElems | ( | GCG_PQUEUE * | pqueue | ) |
returns the number of elements in the queue
- Parameters
-
pqueue priority queue
Definition at line 337 of file gcgpqueue.c.
References GCG_PQueue::len, and NULL.
◆ 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
-
pqueue priority queue
Definition at line 348 of file gcgpqueue.c.
References GCG_PQueue::len, NULL, and GCG_PQueue::slots.