#20561: Return cycle type of a permutation
-------------------------------------+-------------------------------------
Reporter: andrew.mathas | Owner:
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-7.2
Component: group theory | Resolution:
Keywords: permutation, | Merged in:
cycle type | Reviewers:
Authors: Andrew Mathas | Work issues:
Report Upstream: N/A | Commit:
Branch: | b9acb7729e678ee46ef6db66a694c3040db830d0
u/andrew.mathas/return_cycle_type_of_a_permutation| Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Changes (by andrew.mathas):
* status: needs_work => needs_review
Comment:
Replying to [comment:5 vdelecroix]:
> Hello,
>
> You would better use the option `reverse` of `sort` rather than sorting
and inversing.
>
> Sided remark: returning a Partition is very costly. Most of the time
will be spent in the actual construction of the Partition from the given
list.
I have addressed both of these points: the `reverse=True` is now used and
a list is returned.
> On the other hand, constructing the actual cycle tuples to count their
length is not optimal... I would rather implement it from scratch.
I have not changed this as this seems to be unnecessary code duplication.
I have not delved into the cycle code deeply but it seems to me that to
extract this information you would essentially rewrite much of the cython
code in `cycle_tuples`.
--
Ticket URL: <http://trac.sagemath.org/ticket/20561#comment:7>
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 https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.