Home --> Documentations --> PJLIB Reference

pj_rbtree Struct Reference
[Red/Black Balanced Tree]

Data Fields

pj_rbtree_node null_node
unsigned size

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

Key comparison function.

Constant to indicate NULL node.

Constant to indicate NULL node.

Root tree node.

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.