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


GNU libavl 2.0.1

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

12. Right-Threaded AVL Trees

In the same way that we can combine threaded trees with AVL trees to produce threaded AVL trees, we can combine right-threaded trees with AVL trees to produce right-threaded AVL trees. This chapter explores this combination, producing another table implementation.

Here's the form of the source and header files. Notice the use of rtavl_ as the identifier prefix. Likewise, we will often refer to right-threaded AVL trees as "RTAVL trees".

 
&#60;@xref{\NODE\, , License.&#62;,1}
#ifndef RTAVL_H
#define @cindex RTAVL_H macro
RTAVL_H 1
#include &#60;stddef.h&#62;
&#60;@xref{\NODE\, , Table types; tbl =>.&#62; rtavl,14}
&#60;@xref{\NODE\, , BST maximum height; bst =>.&#62; rtavl,28}
&#60;@xref{\NODE\, , TBST table structure; tbst =>.&#62; rtavl,250}
&#60;@xref{\NODE\, , RTAVL node structure.&#62;,417}
&#60;@xref{\NODE\, , TBST traverser structure; tbst =>.&#62; rtavl,267}
&#60;@xref{\NODE\, , Table function prototypes; tbl =>.&#62; rtavl,15}
#endif /* rtavl.h */

 
&#60;@xref{\NODE\, , License.&#62;,1}
#include &#60;assert.h&#62;
#include &#60;stdio.h&#62;
#include &#60;stdlib.h&#62;
#include "rtavl.h"
&#60;@xref{\NODE\, , RTAVL functions.&#62;,418}

12.1 Data Types  
12.2 Operations  
12.3 Rotations  
12.4 Insertion  
12.5 Deletion  
12.6 Copying  
12.7 Testing  


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