libubox
C utility functions for OpenWrt.
avl_node Struct Reference

#include <avl.h>

Collaboration diagram for avl_node:

Data Fields

struct list_head list
 
struct avl_nodeparent
 
struct avl_nodeleft
 
struct avl_noderight
 
const void * key
 
signed char balance
 
bool leader
 

Detailed Description

This element is a member of a avl-tree. It must be contained in all larger structs that should be put into a tree.

Definition at line 56 of file avl.h.

Field Documentation

◆ balance

signed char avl_node::balance

balance state of AVL tree (0,-1,+1)

Definition at line 89 of file avl.h.

◆ key

const void* avl_node::key

pointer to key of node

Definition at line 84 of file avl.h.

◆ leader

bool avl_node::leader

true if first of a series of nodes with same key

Definition at line 94 of file avl.h.

◆ left

struct avl_node* avl_node::left

Pointer to left child

Definition at line 74 of file avl.h.

◆ list

struct list_head avl_node::list

Linked list node for supporting easy iteration and multiple elments with the same key.

this must be the first element of an avl_node to make casting for lists easier

Definition at line 213 of file avl.h.

◆ parent

struct avl_node* avl_node::parent

Pointer to parent node in tree, NULL if root node

Definition at line 69 of file avl.h.

◆ right

struct avl_node* avl_node::right

Pointer to right child

Definition at line 79 of file avl.h.


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