Mission Base

Program Base Library Functions

int pblPriorityQueueChangePriorityAt

( PblPriorityQueue* queue,
  int index,
  int priority )

Changes the priority of the element at the specified position of the priority queue, maintaining the heap condition of the queue.

Documentation

Changes the priority of the element at the specified position of the priority queue, maintaining the heap condition of the queue.

This function has a time complexity of O(Log N), with N being the number of elements in the queue.

Parameters:
queue - The queue to use
index - The index at which the priority is to be changed
priority - The new priority of the element
Returns:
int rc >= 0: The index of the element after the priority change.
int rc < 0: An error see pbl_errno:
PBL_ERROR_OUT_OF_BOUNDS - Index is out of range (index < 0 || index >= size()).

Alphabetic index



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