Mission Base

Program Base Library Functions

void* pblSetReplaceElement

( PblSet* set, void* element )

Replaces the element of the set that matches the given element with the given element.

Documentation

Replaces the element of the set that matches the given element with the given element.

If a matching element is found it is replaced and returned. If no matching element is found NULL is returned.

For tree sets this method has a time complexity of O(Log N), with N being the size of the set.

For hash sets this method has a complexity of O(1).

Parameters:
set - The set to use
element - Element to look for
Returns:
void * retptr != NULL: The element that was replaced.
void * retptr == NULL: There is no matching element.

Alphabetic index



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