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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8e7ac81a215f128c X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!weretis.net!feeder4.news.weretis.net!news.tornevall.net!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: Using Red-Black Trees Date: Sat, 13 Nov 2010 14:53:56 -0700 Organization: TornevallNET - http://news.tornevall.net Message-ID: References: <2419e829-6f45-4075-9005-b9876beb8aaa@r6g2000vbf.googlegroups.com> NNTP-Posting-Host: 716b5375b1793f440d5e6ef5087acc65 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: 3eff38d517456fb66784d4d22b002a5b X-Complaints-To: abuse@tornevall.net User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10 X-Complaints-Language: Spoken language is english or swedish - NOT ITALIAN, FRENCH, GERMAN OR ANY OTHER LANGUAGE! In-Reply-To: <2419e829-6f45-4075-9005-b9876beb8aaa@r6g2000vbf.googlegroups.com> X-UserIDNumber: 1738 X-Validate-Post: http://news.tornevall.net/validate.php?trace=3eff38d517456fb66784d4d22b002a5b X-Complaints-Italiano: Non abbiamo padronanza della lingua italiana - se mandate una email scrivete solo in Inglese, grazie X-Posting-User: 0243687135df8c4b260dd4a9a93c79bd Xref: g2news2.google.com comp.lang.ada:16452 Date: 2010-11-13T14:53:56-07:00 List-Id: On 11/13/2010 04:20 AM, Bj�rn wrote: > I need a self-balancing binary search tree (for a Bentley/Ottmann > implementation), such as the red-black tree that is now part of > Ada.Containers. I need basic operations like insert/remove, next/prev > and find. However, the GNAT implementation of this data structure > seems a bit scary to me and I'm not really sure how to instantiate the > generics and what operations to use. Would someone be able to provide > some example of usage? And yes, I'am aware of that a lot of the other > container implementations uses this structure. I was hoping for > something a bit more boiled down. Are you sure you need a tree? Skip lists serve the same function, are just as fast as balanced trees for searching, and faster than the typical tree implementations for insert and delete. There's a skip-list implementation in the PragmAda Reusable Components: http://pragmada.x10hosting.com/pragmarc.htm -- Jeff Carter "Unix and C are the ultimate computer viruses." Richard Gabriel 99