From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,LOTS_OF_MONEY autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,24d1392c628fdfb6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-04-12 08:04:06 PST Path: supernews.google.com!sn-xit-03!supernews.com!news-feed.riddles.org.uk!news.litech.org!lnsnews.lns.cornell.edu!newsfeed.stanford.edu!feed.textport.net!newsranger.com!www.newsranger.com!not-for-mail Newsgroups: comp.lang.ada From: Ted Dennison Sender: usenet@www.newsranger.com References: <5s2B6.32267$ii5.3236241@afrodite.telenet-ops.be> Subject: Re: array Message-ID: Date: Thu, 12 Apr 2001 14:59:47 GMT NNTP-Posting-Host: 209.208.22.130 X-Complaints-To: abuse@newsranger.com X-Trace: www.newsranger.com 987087587 209.208.22.130 (Thu, 12 Apr 2001 10:59:47 EDT) NNTP-Posting-Date: Thu, 12 Apr 2001 10:59:47 EDT Organization: http://www.newsranger.com Xref: supernews.google.com comp.lang.ada:6818 Date: 2001-04-12T14:59:47+00:00 List-Id: In article <5s2B6.32267$ii5.3236241@afrodite.telenet-ops.be>, Pieter Thysebaert says... >Now I was looking for a function that would allow me to convert the contents >of a tree into an array (and vice versa) >I've found something like arrays with variable range (I mean not fixed at >compile-time) >Well I think that's what I found - does that thing exist ? > >And if it does, how would one manipulate it (add/remove elements) Back in the olden days, binary trees were ususally implmented as arrays. I believe the algorithms for doing so are avilable in "The Art of Computer Programming, Volume 3" ( http://www-cs-faculty.stanford.edu/~knuth/taocp.html ). Go find, or preferably purchase yourself, a copy. > >Or are there data structures like C++ STL stuff (vector etc) available ? The Ada implementation of the Booch Components should have something for size-limited trees, which I would imagine would be implemented using arrays (but I haven't examined the code). --- T.E.D. homepage - http://www.telepath.com/dennison/Ted/TED.html home email - mailto:dennison@telepath.com