Woolz Image Processing Version 1.4.0
|
Data Structures | |
struct | _AlcCPQQueue |
An ![]() | |
struct | _AlcCPQItem |
An item in a calendar priority queue. Typedef: AlcCPQItem. More... | |
Files | |
file | AlcCPQueue.c |
An | |
Functions | |
AlcCPQQueue * | AlcCPQQueueNew (AlcErrno *dstErr) |
Creates a new priority queue. | |
AlcCPQItem * | AlcCPQItemNew (AlcCPQQueue *q, float priority, void *entry, AlcErrno *dstErr) |
Creates a new priority queue item. | |
AlcErrno | AlcCPQQueueFree (AlcCPQQueue *q) |
Frees a priority queue. Queue item entries are not freed. | |
void | AlcCPQItemFree (AlcCPQQueue *q, AlcCPQItem *item) |
Frees a priority queue item by putting it onto the freeItem list. The queue items entries are not freed. | |
AlcErrno | AlcCPQEntryInsert (AlcCPQQueue *q, float priority, void *entry) |
Inserts an entry into the priority queue. This function calls AlcCPQItemNew() followed by AlcCPQItemInsert(). | |
AlcErrno | AlcCPQItemInsert (AlcCPQQueue *q, AlcCPQItem *item) |
Inserts an item into the priority queue. | |
AlcCPQItem * | AlcCPQItemUnlink (AlcCPQQueue *q) |
Unlinks and returns the item with the highest priority from the given priority queue. |
AlcCPQQueue* AlcCPQQueueNew | ( | AlcErrno * | dstErr | ) |
Creates a new priority queue.
dstErr | Destination error pointer may be NULL. |
References ALC_ER_ALLOC, ALC_ER_NONE, AlcCalloc(), AlcCPQQueueFree(), _AlcCPQQueue::bucketBase, _AlcCPQQueue::bucketMin, _AlcCPQQueue::buckets, _AlcCPQQueue::bucketWidth, _AlcCPQQueue::itemBlockSz, _AlcCPQQueue::lastIdx, _AlcCPQQueue::lastPriority, _AlcCPQQueue::maxBucket, _AlcCPQQueue::nBucket, _AlcCPQQueue::nItem, _AlcCPQQueue::nItemDecThr, _AlcCPQQueue::nItemIncThr, and _AlcCPQQueue::resizable.
Referenced by WlzLBTBalanceDomain2D(), WlzLBTBalanceDomain3D(), and WlzMatchICPCtr().
AlcCPQItem* AlcCPQItemNew | ( | AlcCPQQueue * | q, |
float | priority, | ||
void * | entry, | ||
AlcErrno * | dstErr | ||
) |
Creates a new priority queue item.
q | Given queue. |
priority | Priority for the item. |
entry | Entry for the item. |
dstErr | Destination error pointer may be NULL. |
References ALC_ER_NONE, ALC_ER_PARAM, _AlcCPQItem::entry, _AlcCPQQueue::freeItem, _AlcCPQItem::next, _AlcCPQItem::prev, and _AlcCPQItem::priority.
Referenced by AlcCPQEntryInsert().
AlcErrno AlcCPQQueueFree | ( | AlcCPQQueue * | q | ) |
Frees a priority queue. Queue item entries are not freed.
q | Given queue to free. |
References ALC_ER_NONE, AlcBlockStackFree(), AlcFree(), _AlcCPQQueue::buckets, and _AlcCPQQueue::freeStack.
Referenced by AlcCPQQueueNew(), WlzLBTBalanceDomain2D(), and WlzLBTBalanceDomain3D().
void AlcCPQItemFree | ( | AlcCPQQueue * | q, |
AlcCPQItem * | item | ||
) |
Frees a priority queue item by putting it onto the freeItem list. The queue items entries are not freed.
q | The queue. |
item | Given item to free. |
References _AlcCPQQueue::freeItem, _AlcCPQItem::next, and _AlcCPQItem::prev.
Referenced by WlzMatchICPCtr().
AlcErrno AlcCPQEntryInsert | ( | AlcCPQQueue * | q, |
float | priority, | ||
void * | entry | ||
) |
Inserts an entry into the priority queue. This function calls AlcCPQItemNew() followed by AlcCPQItemInsert().
q | The queue. |
priority | Priority of entry. |
entry | Given entry. |
References ALC_ER_NONE, AlcCPQItemInsert(), and AlcCPQItemNew().
AlcErrno AlcCPQItemInsert | ( | AlcCPQQueue * | q, |
AlcCPQItem * | item | ||
) |
Inserts an item into the priority queue.
q | The queue. |
item | Given item to insert. |
References ALC_ER_NONE, _AlcCPQQueue::bucketMin, _AlcCPQQueue::bucketWidth, _AlcCPQQueue::lastIdx, _AlcCPQQueue::lastPriority, _AlcCPQQueue::nBucket, _AlcCPQQueue::nItem, _AlcCPQQueue::nItemIncThr, _AlcCPQItem::priority, and _AlcCPQQueue::resizable.
Referenced by AlcCPQEntryInsert(), and WlzMatchICPCtr().
AlcCPQItem* AlcCPQItemUnlink | ( | AlcCPQQueue * | q | ) |
Unlinks and returns the item with the highest priority from the given priority queue.
q | Given queue. |
References _AlcCPQQueue::bucketBase, _AlcCPQQueue::bucketMin, _AlcCPQQueue::buckets, _AlcCPQQueue::bucketWidth, _AlcCPQQueue::lastIdx, _AlcCPQQueue::lastPriority, _AlcCPQQueue::nBucket, _AlcCPQQueue::nItem, _AlcCPQQueue::nItemDecThr, _AlcCPQItem::priority, and _AlcCPQQueue::resizable.
Referenced by WlzMatchICPCtr().