Debian Codegraph @

README

raw ◀ ▶
1 Debian patch touch this file
1 ========================================================================
2
3 WHAT IS AVLTREE?
4
5 AVLTree is a small implementation of AVL trees for the C programming
6 language. It is distributed under the Library GNU Public License (see
7 the file LICENSE for details).
8
9 This library does the basic stuff. It allows for inserts, searches, and
10 deletes in O(log n) time. It also allows the tree to be used as a linked
11 indexable list (search/insert functions cannot be used in that case).
12
13 If you find a bug, you should mail Wessel Dankers <[email protected]>,
14 who produced this version of the library and therefore is to blame.
15
16 The original author is Michael H. Buselli <[email protected]>, who can
17 be reached at the following address:
18
19 Michael H. Buselli
20 4334 N. Hazel St. #515
21 Chicago, IL 60613-1456
22
23 ========================================================================
24
25 COMPILING THE LIBRARY
26
27 There is a Makefile included in the distribution.
28
29 ========================================================================
30
31 USING THE LIBRARIES
32
33 There are no real usage documents yet. Look at avl.h (you need to
34 include these headers in your programs to use the library) to see what
35 functions and structures are available. As a small example:
36
37 #define BUFSIZE 8192
38
39 int main(void) {
40 char *buf[BUFSIZE];
•41 avl_tree *tree;
42 avl_node *node;
43
44 tree = avl_alloc_tree((avl_compare_t)strcmp, (avl_freeitem_t)free);
45
46 while(fgets(buf, BUFSIZE, stdin))
47 avl_insert(tree, strdup(buf));
48
49 for(node = tree->head; node; node = node->next)
50 printf("%s", node->item);
51
•52 avl_free_tree(tree);
53 }
54
55 A real implementation would check the return values of avl_alloc_tree,
56 avl_insert and strdup of course.
57
58 ========================================================================
59
60 HISTORY
61
62 Version 0.1.0 (alpha):
63 This is the initial alpha version of AVLTree. It's already fully
64 functional for many applications, including the one that I developed it
65 for. I've only tested it on my Linux 2.0.35/glibc2 system, so I have no
66 idea what it will do anywhere else so far. Let me know if you have good
67 results or bad if you try a platform that I don't mention above.
68
69 This version is considered alpha because it does not yet contain
70 all of the features that I plan for version 1.0.0. It should not
71 contain any bugs as it is.
72
73 Version 0.2.0 2000-11-28 Wessel Dankers <[email protected]>
74 Modifications to support fast traversal and accessing by index.
75 The tree is generalized to allow arbitrary comparison functions.
76 Fixed bug: when deleting, in some cases rebalancing would not occur
77
78 Version 0.3.0 2001-01-07 Wessel Dankers <[email protected]>
79 Tree can now be balanced on count or depth (but depth works better).
80 Fixed bug: balancing on count now is done correctly.
81
82 Version 0.3.1 2001-07-17 Wessel Dankers <[email protected]>
83 Node initialization is moved to make matters a bit more robust
84
85 Version 0.3.4 2002-06-11 Wessel Dankers <[email protected]>
86 Fixed a bug in the node counting.
87
88 Version 0.3.5 2002-11-15 Wessel Dankers <[email protected]>
89 Added avl_node_fixup() and avl_clear_tree().
90 Removed obsolete files from source tree.
91
92 ========================================================================