|
C Container Collection (CCC)
|
#include <private_adaptive_map.h>

An entry is a way to store a node or the information needed to insert a node without a second query. The user can then take different actions depending on the Occupied or Vacant status of the entry.
Unlike all the other data structure that offer the entry abstraction the ordered map does not need to store any special information for a more efficient second query. The element, or its closest match, is splayed to the root upon each query. If the user proceeds to insert a new element a second query will result in a constant time operation to make the new element the new root. If intervening operations take place between obtaining an entry and inserting the new element, the best fit will still be close to the root and splaying it again and then inserting this new element will not be too expensive. Intervening operations unrelated this entry would also be considered an anti pattern of the Entry API.
Data Fields | |
| struct CCC_Adaptive_map * | map |
| struct CCC_Entry | entry |
| struct CCC_Entry CCC_Adaptive_map_entry::entry |
The stored node or empty if not found.
| struct CCC_Adaptive_map* CCC_Adaptive_map_entry::map |
The tree associated with this query.