#14291: Orbits of tuples and sets
---------------------------------+------------------------------------------
       Reporter:  ncohen         |         Owner:  joyner      
           Type:  enhancement    |        Status:  needs_review
       Priority:  major          |     Milestone:  sage-5.9    
      Component:  group theory   |    Resolution:              
       Keywords:                 |   Work issues:              
Report Upstream:  N/A            |     Reviewers:              
        Authors:  Nathann Cohen  |     Merged in:              
   Dependencies:                 |      Stopgaps:              
---------------------------------+------------------------------------------

Comment (by vbraun):

 1. `@cached_method` must not return lists, but only immutable things
    {{{
 sage: S3.orbit(3)
 [3, 1, 2]
 sage: type(_)
 list
 }}}
    Just return a tuple.

 2. It would be nice if orbit were smarter about the action type and make
 the output a set/tuple if necessary. For example, desirable behaviour
 would be
    {{{
 sage: S3.orbit(3)       # in domain, use OnPoints
 (1, 2, 3)
 sage: S3.orbit((1,2))   # not in domain, a tuple, use OnTuples
 ((1, 2), (2, 3), (2, 1), (3, 1), (1, 3), (3, 2))
 sage: S3.orbit({1,2})   # not in domain, a set, use OnSets
 ({1, 2}, {2, 3}, {1, 3})
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14291#comment:28>
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