liba 0.1.15
An algorithm library based on C/C++
Loading...
Searching...
No Matches
a_avl_node Struct Reference

instance structure for AVL binary search tree node More...

#include <avl.h>

Collaboration diagram for a_avl_node:
[legend]

Data Fields

struct a_avl_nodeleft
 
struct a_avl_noderight
 
uintptr_t parent_
 

Detailed Description

instance structure for AVL binary search tree node

Field Documentation

◆ left

struct a_avl_node* a_avl_node::left

pointer to left child or null

◆ parent_

uintptr_t a_avl_node::parent_

pointer to parent combined with the balance factor Low 2 bits: One greater than the balance factor of this subtree, which is equal to height(right) - height(left). The mapping is: 00 => -1 01 => 0 10 => +1 11 => undefined The rest of the bits are the pointer to the parent node. It must be 4-byte aligned, and it will be null if this is the root node and therefore has no parent.

◆ right

struct a_avl_node* a_avl_node::right

pointer to right child or null


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