home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d0xx / d034 / btree.lha / Btree / POSTER < prev    next >
Encoding:
Text File  |  1986-09-03  |  2.3 KB  |  61 lines

  1. Article 2168 of net.sources:
  2. Relay-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site well.UUCP
  3. Path: well!ptsfa!lll-lcc!lll-crg!seismo!mcvax!ukc!dcl-cs!sslvax!smj
  4. From: smj@ssl-macc.co.uk (Steve Jefferson)
  5. Newsgroups: net.sources
  6. Subject: B-tree code in C
  7. Message-ID: <359@ssl-macc.co.uk>
  8. Date: 19 Aug 86 09:51:17 GMT
  9. Date-Received: 21 Aug 86 09:50:18 GMT
  10. Reply-To: smj@sslvax.UUCP (Steve Jefferson)
  11. Distribution: net.sources
  12. Organization: Software Sciences Ltd, Macclesfield, UK
  13. Lines: 2574
  14. Keywords: B-tree
  15.  
  16. This article consists of a set of C sources to implement a B-tree
  17. algorithm and several accompanying tests. It was derived from a single 
  18. program obtained from net.sources some time ago but has been revised and
  19. extended somewhat since then. 
  20.  
  21. The code builds to 2 executables:
  22. (1) btree.fe    - an interactive front-end to the main B-tree system
  23.           this implements a simple set of commands
  24.           <number>    : insert given key value into the tree
  25.           i<number>    : ditto
  26.           d<number>    : delete given key value from tree
  27.           l<number>    : locate a given key in tree
  28.           p        : print current tree
  29.           s        : set up a default tree
  30.           x        : exit from program
  31. (2) btree.test    - a series of tests for the B-tree system - typically this
  32.           should be run after any significant change to the B-tree
  33.           code. 
  34.         - 3 tests are performed as follows (a test will only
  35.           proceed if the previous test succeeded):
  36.             (i)   Perform a series of random inserts, deletes
  37.                   and searches, maintaining an external checklist 
  38.                   and checking the shape of the tree after every
  39.                   action
  40.             (ii)  Insert a fixed number of keys in ascending order
  41.                   then delete them in ascending order
  42.             (iii) As (ii) but everything is in descending order
  43.  
  44. Limitations:
  45.     (1)    The B-tree is implemented as a series of *struct*s in
  46.         memory - explicit reads and writes of (disc) blocks would
  47.         be more useful.
  48.     (2)    The current system only allows for unique key values
  49.         and not data with identical key values which can then be
  50.         distinguished by the actual information content of the data.
  51.  
  52. If anyone has any suggestions or modifications for this code, or indeed has 
  53. any B-tree code of their own which they are willing to release, I would most 
  54. interested.
  55.  
  56.                 Steve Jefferson
  57.             (smj@uk.co.ssl-macc or smj@sslvax.UUCP)
  58.  
  59.  
  60. --------------------------------- cut here -----------------------------------
  61.