Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!torn!nott!cunews!superior!ccscon21
From: ccscon21@superior.carleton.ca (Iain Bennett)
Subject: BTree implementation
Message-ID: <D08yGL.FK8@cunews.carleton.ca>
Sender: news@cunews.carleton.ca (News Administrator)
Organization: Carleton University
X-Newsreader: TIN [version 1.2 PL0]
Date: Sat, 3 Dec 1994 18:09:57 GMT
Lines: 21

I was wondering if I could get some help with a B-Tree implementation.
 
A BTree has pages, which in turn have PageCells.  A PageCell has a
currentValue and knows its left and right children.  Pages have a
collection of PageCells and know what their parent Page is.
 
I know we're going to use a recursive insert but my problem is where
to start.  The root can have any number of PageCells in it to a
maximum of 2n where n is the order.  Any other child Page of the
rootPage must have at least n PageCells.
 
When a page overflows, we must either split or merge.  When a page
underflows we have to merge.

--

--------------------------------------------------------------------
Iain J.R. Bennett-Hansell       |Homepage:
Computer Science 2              |  HTTP://WWW.Carleton.CA/~ccscon21
--------------------------------|-----------------------------------
ccscon21@CCS.Carleton.CA        | CCS Consultation Account 
