|
84761 packages online
|
|
|
|
dev/c/BinaryTrees.lzh |
|
No screenshot available
|
Short: | Binary AVL & Splay trees non-recursive. |
Author: | crhubiqx.mn.org (Christopher R. Hertel) |
Uploader: | crh ubiqx mn org (Christopher R Hertel) |
Type: | dev/c |
Version: | 2.4. |
Architecture: | m68k-amigaos |
Date: | 1997-08-07 |
Download: | dev/c/BinaryTrees.lzh - View contents | Readme: | dev/c/BinaryTrees.readme |
Downloads: | 575 |
|
Written in C using OOP techniques, these modules provide three forms of
binary tree: Simple (unbalanced) AVL (height-balanced), and Splay. AVL
trees are re-balanced after every insertion or deletion. For each node in
the tree, the difference in height between the left and right subtree is
at most 1. Splay trees use a different approach. Each time a node is
accessed (inserted, deleted, or directly found via a search), the node is
bubbled to the top of the tree. This has the effect of making the tree
'bushier' and placing the most frequently accessed nodes nearer to the
top.
The functions are non-recursive to limit stack space usage, and can also
be made into a run-time library. The type of tree used is determined by
which header file is included with your program. No other code changes
are necessary.
Pretty darn fast, too, IMHO.
Chris Hertel
|
Contents of dev/c/BinaryTrees.lzh
PERMSSN UID GID PACKED SIZE RATIO METHOD CRC STAMP NAME
---------- ----------- ------- ------- ------ ---------- ------------ -------------
-rw-r--r-- 1110/20 581 1038 56.0% -lh5- d3a3 Aug 6 1997 BinaryTrees.readme
-rw-r--r-- 1110/20 7334 27943 26.2% -lh5- dac8 Jul 26 1997 ubi_AVLtree.c
-rw-r--r-- 1110/20 5091 15982 31.9% -lh5- 0e66 Jul 26 1997 ubi_AVLtree.h
-rw-r--r-- 1110/20 11362 42918 26.5% -lh5- 7439 Jul 26 1997 ubi_BinTree.c
-rw-r--r-- 1110/20 9211 35348 26.1% -lh5- c7dd Jul 26 1997 ubi_BinTree.h
-rw-r--r-- 1110/20 5910 19641 30.1% -lh5- 5e55 Jul 26 1997 ubi_SplayTree.c
-rw-r--r-- 1110/20 4866 15650 31.1% -lh5- a4ee Jul 26 1997 ubi_SplayTree.h
-rw-r--r-- 1110/20 2664 9245 28.8% -lh5- b367 Jul 26 1997 ubi_sample.c
---------- ----------- ------- ------- ------ ---------- ------------ -------------
Total 8 files 47019 167765 28.0% Aug 7 1997
|
|
|
|
Page generated in 0.02 seconds |
Aminet © 1992-2024 Urban
Müller and the Aminet team.
Aminet contact address: <aminetaminet net> |