Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 28 lines (22 sloc) 0.705 kB
#!/usr/bin/python -Wall
# ================================================================
# Please see LICENSE.txt in the same directory as this file.
# John Kerl
# kerl.john.r@gmail.com
# 2007-05-31
# ================================================================
# Group module for permutation group S_n, with image-map I/O.
import pmti_tm
import sackint
def get_elements(n, sort_them=True):
group_size = sackint.factorial(n)
elts = []
for k in range(0, group_size):
elt = pmti_tm.kth_pmti(k, n, group_size)
elts.append(elt)
if sort_them:
pmti_tm.sort_pmtis(elts)
return elts
def get_elements_str(params_string):
n = pmti_tm.params_from_string(params_string)
return get_elements(n)
Jump to Line
Something went wrong with that request. Please try again.