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

#include <private_adaptive_map.h>

Collaboration diagram for CCC_Adaptive_map:

Detailed Description

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_noderoot
 
size_t size
 
size_t sizeof_type
 
size_t type_intruder_offset
 
size_t key_offset
 
CCC_Key_comparatorcompare
 
CCC_Allocatorallocate
 
void * context
 

Field Documentation

◆ allocate

CCC_Allocator* CCC_Adaptive_map::allocate

The user defined allocation function, if any.

◆ compare

CCC_Key_comparator* CCC_Adaptive_map::compare

The user defined comparison callback function.

◆ context

void* CCC_Adaptive_map::context

Auxiliary data, if any.

◆ key_offset

size_t CCC_Adaptive_map::key_offset

The byte offset of the user key in the user type.

◆ root

struct CCC_Adaptive_map_node* CCC_Adaptive_map::root

The root of the splay tree. The "hot" node after a query.

◆ size

size_t CCC_Adaptive_map::size

The number of stored tree nodes.

◆ sizeof_type

size_t CCC_Adaptive_map::sizeof_type

The size of the user type stored in the tree.

◆ type_intruder_offset

size_t CCC_Adaptive_map::type_intruder_offset

The byte offset of the intrusive element.


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