comp.lang.ada
 help / color / mirror / Atom feed
From: "John B. Matthews" <nospam@nospam.invalid>
Subject: Re: Using Red-Black Trees
Date: Mon, 15 Nov 2010 10:32:29 -0500
Date: 2010-11-15T10:32:29-05:00	[thread overview]
Message-ID: <nospam-5BC5F2.10322915112010@news.aioe.org> (raw)
In-Reply-To: 4CE0F407.6090101@gmail.com

In article <4CE0F407.6090101@gmail.com>,
 Stephane Carrez <Stephane.Carrez@gmail.com> wrote:

> > There's a Red-Black Tree in Ada.Containers?!  Can someone tell me 
> > where to find it in the ARM?
> 
> GNAT uses the Red-Black tree for the implementation of ordered maps 
> and sets.
> 
> You should use Ada.Containers.Ordered_Maps instead.  Instantiation is 
> similar to the Hashed_Maps but you should need to specify the 
> comparison operator "<".
> 
> See http://www.adaic.org/standards/05rm/html/RM-A-18-6.html
> (Likewise for the Indefinite_Ordered_* packages)

Here's a simple example that uses an instance of Ordered_Maps to examine 
collisions that would occur in an instance of Hashed_Maps:

<http://home.roadrunner.com/~jbmatthews/jumble.html#sec2>

-- 
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>



  reply	other threads:[~2010-11-15 15:32 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-13 11:20 Using Red-Black Trees Björn
2010-11-13 12:14 ` Phil Thornley
2010-11-13 13:10 ` Alex Mentis
2010-11-13 13:23   ` Björn
2010-11-13 13:53     ` Alex Mentis
2010-11-13 14:06       ` Björn
2010-11-13 16:31       ` Simon Wright
2010-11-15  8:49   ` Stephane Carrez
2010-11-15 15:32     ` John B. Matthews [this message]
2010-11-15 22:46   ` Randy Brukardt
2010-11-16 16:10     ` Gene
2010-11-16 17:17       ` Alex Mentis
2010-11-16 19:51         ` Randy Brukardt
2010-11-16 21:24           ` Colin Paul Gloster
2010-11-17  2:50           ` Alex Mentis
2010-11-17  5:10             ` Adam Beneschan
2010-11-17 22:59               ` Yannick Duchêne (Hibou57)
2010-11-17 23:15                 ` Vinzent Hoefler
2010-11-17 23:39                   ` Yannick Duchêne (Hibou57)
2010-11-18  0:13                     ` Vinzent Hoefler
2010-11-18  6:27                     ` J-P. Rosen
2010-11-18  7:08                       ` Yannick Duchêne (Hibou57)
2010-11-18 10:47                         ` stefan-lucks
2010-11-18 10:45                           ` Yannick Duchêne (Hibou57)
2010-11-18  9:02                       ` Dmitry A. Kazakov
2010-11-18 12:36                         ` J-P. Rosen
2010-11-18 13:23                           ` Dmitry A. Kazakov
2010-11-17 22:38     ` Yannick Duchêne (Hibou57)
2010-11-13 21:53 ` Jeffrey Carter
2010-11-14  8:20   ` Björn
2010-11-14  8:37     ` Dmitry A. Kazakov
2010-11-13 23:51 ` robin
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox