Thread overview | |||||
---|---|---|---|---|---|
|
June 11, 2005 Associative Arrays | ||||
---|---|---|---|---|
| ||||
Are associative arrays implemented with hashtables? Or does them use some tree structure? |
June 11, 2005 Re: Associative Arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant^2i | "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 |
June 12, 2005 Re: Associative Arrays | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant^2i | "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. |
Copyright © 1999-2021 by the D Language Foundation