C Container Collection (CCC)
Loading...
Searching...
No Matches
CCC_Adaptive_map_entry Struct Reference

#include <private_adaptive_map.h>

Collaboration diagram for CCC_Adaptive_map_entry:

Detailed Description

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_mapmap
 
struct CCC_Entry entry
 

Field Documentation

◆ entry

struct CCC_Entry CCC_Adaptive_map_entry::entry

The stored node or empty if not found.

◆ map

struct CCC_Adaptive_map* CCC_Adaptive_map_entry::map

The tree associated with this query.


The documentation for this struct was generated from the following file: