#14772: Remove CombinatorialClass from Permutations
------------------------------------+------------------------------------
       Reporter:  tscrim            |         Owner:  sage-combinat
           Type:  enhancement       |        Status:  needs_review
       Priority:  major             |     Milestone:  sage-5.11
      Component:  combinatorics     |    Resolution:
       Keywords:  days49            |     Merged in:
        Authors:  Travis Scrimshaw  |     Reviewers:
Report Upstream:  N/A               |   Work issues:
         Branch:                    |  Dependencies:  #8386 #14519 #14808
       Stopgaps:                    |
------------------------------------+------------------------------------

Comment (by tscrim):

 `Permutations` is suppose to be a common abstract base class for all
 permutations (in some way it models the category of all types of
 permutations), so having permutations of length k inherit from it makes
 sense. However I think we need to implement a stronger `__contains__()`
 for the non-standard permutations, perhaps a stupid `return x in
 list(self)` (which, somewhat surprisingly to me, the category of
 `FiniteEnumeratedSets` does not provide by default).

 Also, to fix the backtracker issue, what needs to be done is some simple
 corner case checking in the `__iter__` methods for `n == 0`. Only if `n >
 0` do you call `PatternAvoider`.

 Best,[[BR]]
 Travis

--
Ticket URL: <http://trac.sagemath.org/ticket/14772#comment:37>
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.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to