www.delorie.com/gnu/docs/avl/libavl_216.html   search  
 
Buy GNU books!


GNU libavl 2.0.1

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

13. Right-Threaded Red-Black Trees

This chapter is this book's final demonstration of right-threaded trees, carried out by using them in a red-black tree implementation of tables. The chapter, and the code, follow the pattern that should now be familiar, using rtrb_ as the naming prefix and often referring to right-threaded right-black trees as "RTRB trees".

 
&#60;@xref{\NODE\, , License.&#62;,1}
#ifndef RTRB_H
#define @cindex RTRB_H macro
RTRB_H 1
#include &#60;stddef.h&#62;
&#60;@xref{\NODE\, , Table types; tbl =>.&#62; rtrb,14}
&#60;@xref{\NODE\, , RB maximum height; rb =>.&#62; rtrb,195}
&#60;@xref{\NODE\, , TBST table structure; tbst =>.&#62; rtrb,250}
&#60;@xref{\NODE\, , RTRB node structure.&#62;,454}
&#60;@xref{\NODE\, , TBST traverser structure; tbst =>.&#62; rtrb,267}
&#60;@xref{\NODE\, , Table function prototypes; tbl =>.&#62; rtrb,15}
#endif /* rtrb.h */

 
&#60;@xref{\NODE\, , License.&#62;,1}
#include &#60;assert.h&#62;
#include &#60;stdio.h&#62;
#include &#60;stdlib.h&#62;
#include "rtrb.h"
&#60;@xref{\NODE\, , RTRB functions.&#62;,455}

13.1 Data Types  
13.2 Operations  
13.3 Insertion  
13.4 Deletion  
13.5 Testing  


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003