digitalmars.D - Associative Arrays
- Ant^2i (2/2) Jun 11 2005 Are associative arrays implemented with hashtables?
- Walter (3/5) Jun 11 2005 Both. The source is in phobos/internal/aaA.d
- Ben Hinkle (7/9) Jun 12 2005 When you say tree structure - do you mean a balanced tree like STL's map...
Are associative arrays implemented with hashtables? Or does them use some tree structure?
Jun 11 2005
"Ant^2i" <Ant^2i_member pathlink.com> wrote in message news:d8fsdg$1ed6$1 digitaldaemon.com...Are associative arrays implemented with hashtables? Or does them use some tree structure?Both. The source is in phobos/internal/aaA.d
Jun 11 2005
"Ant^2i" <Ant^2i_member pathlink.com> wrote in message news:d8fsdg$1ed6$1 digitaldaemon.com...Are associative arrays implemented with hashtables? Or does them use some tree structure?When you say tree structure - do you mean a balanced tree like STL's map? The builtin AA uses trees but they aren't balanced expicitly. If you want a sorted associative array then check out one of the container template libraries like MinTL, DTL or Indigo. Since I wrote MinTL I know it has a sorted AA but I don't know all that much about the others.
Jun 12 2005