Mission Base

Program Base Library Functions

void* pblSetGet

( PblSet* set, int index )

Returns the element at the specified position in this set.

Documentation

Returns the element at the specified position in this set.

Retrieving the first or last element of a hash set has a time complexity of O(N), with N being the capacity of the set.

Retrieving the first or last element of a tree set has a time complexity of O(Log N), with N being the size of the set.

For any set retrieving a random element from any set has O(N), with N being the size of the set.

Parameters:
set - The set to use
index - Index of the element to return
Returns:
void * retptr != NULL: The element at the specified position in this set.
void * retptr == NULL: An error, see pbl_errno:
PBL_ERROR_OUT_OF_BOUNDS - Index is out of range (index < 0 || index >= size()).
PBL_ERROR_PARAM_COLLECTION - The set cannot be iterated.

Alphabetic index



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