[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ruby-talk
Subject:    Re: Hal Fulton's Set class
From:       "Jason Voegele" <jason () jvoegele ! com>
Date:       2002-01-30 14:37:05
[Download RAW message or body]

> Hal E. Fulton wrote:
> 
>>----- Original Message ----- 
>>From: "David Corbin" <dcorbin@imperitek.com>
>>To: "ruby-talk ML" <ruby-talk@ruby-lang.org>
>>Sent: Tuesday, January 29, 2002 5:04 AM
>>Subject: Hal Fulton's Set class
>>
>>
>>>I'm attempting to use this class 
>>>(http://www.hypermetrics.com/rubyset.html), and I don't see a way to
>>>add  individual elements to an existing Set.  I'm sure I'm missing
>>>something,  but even the tests don't reveal anything to me.
>>>
>>
>>Ahh... I really should remove that thing or rewrite it.
>>
>>I wrote it when I was learning Ruby over two years ago... I probably
>>knew less about it than you know now.
>>
>>And there probably is no way to add elements. I'd have to 
>>look at it again to see.
>>
>>If you're interested in this, I suggest you rewrite it as an 
>>exercise...
>>
> I might do so, but I'm sure I have less experience with Ruby that you 
> had at the time :)

You could check out this one:

http://cvs.sourceforge.net/cgi-
bin/viewcvs.cgi/*checkout*/rubycollections/rubycollections/rbc/set.rb?
rev=HEAD&content-type=text/plain

That's a Set implemented in Ruby.  There's also a Set implemented in C 
that's significantly faster, as part of our RubyCollections project on 
SourceForge:

http://sourceforge.net/projects/rubycollections

Jason Voegele



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic