Set class for D

Clay Smith clayasaurus at gmail.com
Thu Apr 26 13:04:24 PDT 2007


Bill Baxter wrote:
> There was some discussion a while back about a Set class.
> I think Tango has one, but unfortunately I'm not on Tango yet.
> Anyone have a link for a Phobos-compatible set class?
> I checked dsource and scrapple, and tried searching the NG, but "set" 
> gets a lot of bogus hits :-(.
> 
> --bb

Here's a RedBlack tree implementation in D.

http://www.dsource.org/projects/arclib/browser/trunk/arc/templates/redblacktree.d

It's in public domain, and based on this (now explicitly said ;) ) 
public domain C code.

http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_rbtree.aspx

I used it to convert a C++ 2D physics engine --> D , replacing C++ set 
with this red black tree.

~ Clay



More information about the Digitalmars-d mailing list