TreeSet
Toki
thorstenkiefer at gmx.de
Sat Aug 2 16:00:35 PDT 2008
Benji Smith Wrote:
> > sorry I meant you can use an associative array with a boolean dummy
> > value, e.g.:
> > bool[uint] myset;
>
> It's not *quite* the same.
>
> A java TreeSet<T> uses a red-black tree implementation rather than a
> hashtable implementation (like the java HashSet<T> class). Consequently,
> a TreeSet<T>.ValueIterator will always iterate the values in their
> natural ordering, whereas a HashSet<T>.ValueIterator makes no guarantees
> about its iteration ordering.
>
> I don't know whether Tango provides any equivalent containers. Tango
> definitely has TreeMap and TreeBag implementations, but there doesn't
> seem to be a TreeSet.
>
> http://dsource.org/projects/tango/docs/current/
>
> Someone with more Tango expertise could probably clarify...
>
> --benji
Thnak you,
that's what I was looking for.
But the next question: is tango available for dmd, or only for gdc ?
-Toki
More information about the Digitalmars-d
mailing list