New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster iterator for permutation groups #28653
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
Ticket retargeted after milestone closed |
comment:3
Batch modifying tickets that will likely not be ready for 9.1, based on a review of the ticket title, branch/review status, and last modification date. |
comment:5
Different order in Python 2 and Python 3 is no longer be a problem. |
comment:6
voila une premiere tentative naive. Pas bien plus rapide, en fait New commits:
|
Commit: |
Branch: public/ticket-28563 |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Changed branch from public/ticket-28563 to public/ticket-28653 |
comment:9
is this reasonable now ? |
comment:10
What I thought was to reuse If you use the swap algorithm from Knuth, it is trivial to make it work for |
comment:11
Voila une nouvelle tentative. |
Changed dependencies from #28652 to none |
Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
Branch pushed to git repo; I updated commit sha1. New commits:
|
This comment has been minimized.
This comment has been minimized.
Branch pushed to git repo; I updated commit sha1. New commits:
|
comment:17
bon, alors evidemment, ca casse un certain nombre de doctests. Avant de se lancer dans l'etude au cas par cas de ces doctests, je voudrais savoir si le code proposé est une bonne idée ou pas. En particulier, pour les permutations, vaut-il mieux passer par itertools comme je le fait ou bien faire la meme chose que pour les permutations alternées ? peut-etre aussi peut-on utiliser une maniere plus efficace de créer une permutation ? |
comment:18
Les permutations sont des tableaux d'entiers en C. Voir comment:10. |
comment:19
Certes. Mais tu veux dire quoi, exactement ? Qu'il faut ré-implementer l'algo de Knuth au lieu d'utiliser la version existante, qui ne se passe pas au niveau array ? |
comment:20
Qu'il faut réécrire les fonctions de |
comment:21
Setting new milestone based on a cursory review of ticket status, priority, and last modification date. |
comment:22
There are multiple failing tests. |
comment:23
Setting a new milestone for this ticket based on a cursory review. |
The default iterator for permutation group makes use of a strong generating system (when the group is not cyclic). This is expensive and should be avoided for faster code when the group is well known or small. However, as noticed in #28539, the
RecursiveEnumeratedSet
generates elements in a different order in Python 2 and Python 3 and makes it delicate to use.For some named permutation groups (symmetric, alternating, dihedral) we implement direct straightforward algorithms.
CC: @slel
Component: group theory
Author: Vincent Delecroix
Branch/Commit: public/ticket-28653 @
78088d9
Issue created by migration from https://trac.sagemath.org/ticket/28653
The text was updated successfully, but these errors were encountered: