WARNING: The online documentation has moved to https://docs.pjsip.org.

Visit the new documentation at https://docs.pjsip.org:

BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJLIB Reference

pj_rbtree Struct Reference

#include <rbtree.h>

Data Fields

pj_rbtree_node null_node
 
pj_rbtree_nodenull
 
pj_rbtree_noderoot
 
unsigned size
 
pj_rbtree_compcomp
 

Detailed Description

Declaration of a red-black tree. All elements in the tree must have UNIQUE key. A red black tree always maintains the balance of the tree, so that the tree height will not be greater than lg(N). Insert, search, and delete operation will take lg(N) on the worst case. But for insert and delete, there is additional time needed to maintain the balance of the tree.

Field Documentation

◆ comp

pj_rbtree_comp* pj_rbtree::comp

Key comparison function.

◆ null

pj_rbtree_node* pj_rbtree::null

Constant to indicate NULL node.

◆ null_node

pj_rbtree_node pj_rbtree::null_node

Constant to indicate NULL node.

◆ root

pj_rbtree_node* pj_rbtree::root

Root tree node.

◆ size

unsigned pj_rbtree::size

Number of elements in the tree.


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

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.