23 юни 2012, събота, 20:12:32 UTC+3, David Joyner написа:
>
> On Sat, Jun 23, 2012 at 10:59 AM, Aleksandar Makelov 
> <[email protected]> wrote: 
> > 
> > 
>
> ... 
>
> >> The general comment, which is really a design issue 
> >> more than anything else, is that I like the module structure laid 
> >> out in Sage: 
> >> http://www.sagemath.org/doc/reference/groups.html 
> >> There is a separate module for all the "named" permutation 
> >> groups (eg, the AlternatingGroup), of which there are 16 listed 
> >> there. I am afraid that the perm_group module will get too 
> >> huge quickly without some thought to a more modular 
> >> structure. BTW, I wrote the sage module permgroup_named.py, 
> >> 
> >> 
> http://www.sagemath.org/doc/reference/sage/groups/perm_gps/permgroup_named.html,
>  
>
> >> and please feel free to take all you want and relicense it BSD 
> >> with my permission. 
> > 
> > 
> > Good, this is now addressed in my pull request for weeks 2-3: 
> > https://github.com/sympy/sympy/pull/1377 
>
>
> Great work. Looks like good progress to me. 
>
> When trying to implement the Rubik's cube group for testing, I ran 
> into the following 
>
>
> g1 = Permutation([[1, 3, 8, 6],[2, 5, 7, 
> 4],[9,33,25,17],[10,34,26,18],[11,35,27,19]]) 
> --------------------------------------------------------------------------- 
>
> ValueError                                Traceback (most recent call 
> last) 
> /Users/wdj/pythonfiles/sympy/<ipython-input-6-08f78f951d6f> in <module>() 
> ----> 1 g1 = Permutation([[1, 3, 8, 6],[2, 5, 7, 
> 4],[9,33,25,17],[10,34,26,18],[11,35,27,19]]) 
>
> /Users/wdj/pythonfiles/sympy/sympy/combinatorics/permutations.py in 
> __new__(cls, *args, **kw_args) 
>     365         temp = [int(i) for i in flatten(args[0])] 
>     366         if set(range(len(temp))) != set(temp): 
> --> 367             raise ValueError("Integers 0 through %s must be 
> present." % len(temp)) 
>     368 
>     369         cform = aform = None 
>
> ValueError: Integers 0 through 20 must be present. 
>
>
>
> I assume this is because disjoint cycle notation is not yet completely 
> implemented? 
>
>
Yes, cyclic notation is available, but at present you have to list all the 
fixed points as well, which is sort of ugly. Using the occasion to talk 
about it,
I intend to do the following to deal with it:
- when a permutation is entered in cyclic form, find the maximum of the 
numbers present and set the degree of the permutation to be this maximum + 1
- supply an additional argument to the constructor so that the degree can 
be set manually (for example, Perm([[0,1]], 1000) )
This is going to lead to some complications, for example when multiplying 
two permutations with different degrees, and so on and so on... but still 
seems reasonable.
What do you guys think about this idea, and do you have any other 
suggestions for a possible way to exclude the singleton cycles from the 
cyclic form?

> >> 
> >> 
> >> I would also recommend splitting off permutation group homomorphisms, 
> >> once you write them, into another module. 
>
> ... 
>
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "sympy" group. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msg/sympy/-/km-fcZm_MskJ. 
> > 
> > To post to this group, send email to [email protected]. 
> > To unsubscribe from this group, send email to 
> > [email protected]. 
> > For more options, visit this group at 
> > http://groups.google.com/group/sympy?hl=en. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sympy/-/2YWTz4zi7WEJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to