Mission Base

Program Base Library Functions

void* pblSetRemoveAt

( PblSet* set, int index )

Removes the element at the specified position in this set.

Documentation

Removes the element at the specified position in this set.

For hash sets removing from a position of the set has a time complexity of O(N), with N being the capacity of the set.

For tree sets removing from the beginning or the end of the set has a time complexity of O(Log N), while removing from a random position in the middle of the set has a time complexity of O(N), with N being the number of elements in the set.

Parameters:
set - The set to use
index - The index at which the element is to be removed
Returns:
void * retptr != NULL: The element that was removed.
void * retptr == NULL: 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++.