Ticket #8500: trac_8500_number_transitive_group-review-nb.patch

File trac_8500_number_transitive_group-review-nb.patch, 1.4 KB (added by nborie, 12 years ago)
• sage/groups/perm_gps/permgroup_named.py

```# HG changeset patch
# User Nicolas Borie <nicolas.borie at math.u-psud.fr>
# Date 1271664282 -7200
# Node ID 3086c5a74b683730e92330aa5bf1d5d8573c7c09
# Parent  8e9e6b0d869e12391482391b94877307fcb73f22
#8500: Add the set of TransitiveGroups; final patch

diff -r 8e9e6b0d869e -r 3086c5a74b68 sage/groups/perm_gps/permgroup_named.py```
 a d = ZZ(d) n = ZZ(n) assert d >= 0 assert n > 0 max_n = TransitiveGroups(d).cardinality() assert n <= max_n, "n should be in {1,..,%s}"%max_n assert n > 0, "n should be in {1,..,%s}"%max_n gap_group = 'Group([()])' if d in [0,1] else 'TransitiveGroup(%s,%s)'%(d,n) try: PermutationGroup_generic.__init__(self, gap_group=gap_group) class TransitiveGroupsAll(DisjointUnionEnumeratedSets): """ The finite set of all transitive groups. The infinite set of all transitive groups. EXAMPLES:: sage: TransitiveGroups(5)[0] Traceback (most recent call last): ... assert n > 0 AssertionError AssertionError: n should be in {1,..,5} """ return TransitiveGroup(self._degree, n)