Mission Base

Program Base Library Functions

PblPriorityQueue* pblPriorityQueueNew

( void )

Creates a new priority queue.

Documentation

Creates a new priority queue.

The priority queue implementation is a binary max-heap using an array list as underlying data structure. The entries kept in the array list are of type PblPriorityQueueEntry. Each entry holding the 'void *' element payload and the 'int' priority associated with the element.

This function has a time complexity of O(1).

Returns:
PblPriorityQueue * retPtr != NULL: A pointer to the new priority queue.
PblPriorityQueue * retPtr == NULL: An error, see pbl_errno:
PBL_ERROR_OUT_OF_MEMORY - Out of memory.

Alphabetic index



This page was generated with the help of DOC++.