rbtree and other types.
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Thu, 20 May 2010 10:24:35 +0000 (06:24 -0400)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Thu, 20 May 2010 10:24:35 +0000 (06:24 -0400)
03types/types

index d43e997..da8a825 100644 (file)
@@ -138,10 +138,43 @@ Reference:
 * find\\_next\\_zero\\_bit
 * for\\_each\\_set\\_bit
 
-# Trees and hashes
+# Reb-black tree
 
-* FIX_ME
+# Files
+
+* Documentation/rbtree.txt
+* lib/rbtree.c
+* include linux/rbtree.h
+
+# Usage
+
+* Embed struct rb\\_node into your data structure
+* There's no callback for comparison, write your own lookup and insertion
+  functions
+* Locking is up to the user
+
+# API
+
+* rb\\_entry is the same as container\\_of
+* Create the root with struct rb\\_root name = RB\\_ROOT;
+* Lookup function (see example) uses rb\\_left and rb\\_right members
+* Insertion: lookup insertion point, save the parent and use the functions
+  rb\\_link\\_node and rb\\_insert\\_color (example in Documentation)
+* Erase with rb\\_erase
+* Iterate with functions rb\\_first, rb\\_last, rb\\_next and rb\\_prev
+
+# Hashes
+
+* No hash table
+* There are hash functions found at
+       - include linux/hash.h
+       - include linux/jhash.h
+* Users usually do chaining to resolve collisions
 
 # Other data types
 
-* FIX_ME
+* IDR
+* Flexible Array
+* Plist
+* Radix tree
+* Btree