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

Runs the top down splay tree algorithm over a node based tree. A Splay Tree offers amortized O(log(N)) because it is a self-optimizing structure that operates on assumptions about usage patterns. Often, these assumptions result in frequently accessed elements remaining a constant distance from the root for O(1) access. However, anti-patterns can arise that harm performance. The user should carefully consider if their data access pattern can benefit from a skewed distribution before choosing this container.
Data Fields | |
| struct CCC_Adaptive_map_node * | root |
| size_t | size |
| size_t | sizeof_type |
| size_t | type_intruder_offset |
| size_t | key_offset |
| CCC_Key_comparator * | compare |
| CCC_Allocator * | allocate |
| void * | context |
| CCC_Allocator* CCC_Adaptive_map::allocate |
The user defined allocation function, if any.
| CCC_Key_comparator* CCC_Adaptive_map::compare |
The user defined comparison callback function.
| void* CCC_Adaptive_map::context |
Auxiliary data, if any.
| size_t CCC_Adaptive_map::key_offset |
The byte offset of the user key in the user type.
| struct CCC_Adaptive_map_node* CCC_Adaptive_map::root |
The root of the splay tree. The "hot" node after a query.
| size_t CCC_Adaptive_map::size |
The number of stored tree nodes.
| size_t CCC_Adaptive_map::sizeof_type |
The size of the user type stored in the tree.
| size_t CCC_Adaptive_map::type_intruder_offset |
The byte offset of the intrusive element.