On Sat, May 21, 2011 at 2:42 AM, Andres Valloud < [email protected]> wrote:
> I think you want the add: that returns true/false depending on whether the > object was there or not. In that way, you can just say add: and forget > about includes:. > > yes, exactly. That's what we ended up doing. Thanks > > On 5/19/11 15:34 , Mariano Martinez Peck wrote: > >> Hi guys. We are doing graph traversal (for Fuel) and we would love a >> collection to be really fast and only support two simple operations: >> #add: and #includes: >> The idea is that each object we process of the graph we put it in the >> collection and then for each object we have to ask whether it is >> included or not (to avoid cycles and putting the same object more than >> once). >> >> VW seems to have ObjectRegistry (subclass of IdentitySet) which is more >> or less that. It is used by ObjectTracer, which in fact is what we want >> to do. And even more, Parcels uses that ;) (or an extension of that). >> >> So...I wonder, is there a special collection implementation ideal for >> this case? is something similar to ObjectRegistry available for pharo ? >> >> Thanks in advance, >> >> -- >> Mariano >> http://marianopeck.wordpress.com >> >> > -- Mariano http://marianopeck.wordpress.com
