计算机科学 > 数学软件
[提交于 2013年7月26日]
标题:Python for education: permutations
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:Python implementation of permutations is presented. Three classes are introduced: Perm for permutations, Group for permutation groups, and PermError to report any errors for both classes. The class Perm is based on Python dictionaries and utilize cycle notation. The methods of calculation for the perm order, parity, ranking and unranking are given. A random permutation generation is also shown. The class Group is very simple and it is also based on dictionaries. It is mainly the presentation of the permutation groups interface with methods for the group order, subgroups (normalizer, centralizer, center, stabilizer), orbits, and several tests. The corresponding Python code is contained in the modules perms and groups.
提交历史
来自:Andrzej Kapanowski[v1] 2013年7月26日 星期五 14:18:21 UTC