#14411: Disjoint Sets --> iter
---------------------------------------+------------------------------------
       Reporter:  elixyre              |         Owner:  jason, ncohen, rlm
           Type:  enhancement          |        Status:  needs_review      
       Priority:  major                |     Milestone:  sage-5.10         
      Component:  misc                 |    Resolution:                    
       Keywords:                       |   Work issues:                    
Report Upstream:  N/A                  |     Reviewers:  Travis Scrimshaw  
        Authors:  Jean-Baptiste Priez  |     Merged in:                    
   Dependencies:                       |      Stopgaps:                    
---------------------------------------+------------------------------------

Comment (by elixyre):

 I made a new version. It's ok with that?

 Furthermore, I added a new method ``_getitem_`` which return the set
 associated to the argument:
 {{{
 sage: d =  DisjointSet(range(4))
 sage: d.union(1,2); d
 {{0}, {1,2}, {3}}
 sage: d[2]
 [1,2]
 }}}

 (My opinion is when we write ``d.find(2)`` we expect ``[1,2]`` and not
 ``1`` (that means nothing for user) but I don't want reimplement all so...
 what is your opinion about that?)

 Thanks,

 Jean-Baptiste

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14411#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to