@@ -145,9 +145,9 @@ def OP_represent(int n, merges, perm):
145145 print (" Finding:" )
146146 for i in range (n):
147147 j = OP_find(OP, i)
148- s = " %d -> %d " % (i, j)
148+ s = " %d -> %d " % (i, j)
149149 if i == j:
150- s += " , root: size=%d , mcr=%d , rank=%d " % \
150+ s += " , root: size=%d , mcr=%d , rank=%d " % \
151151 (OP.size[i], OP.mcr[i], OP.rank[i])
152152 print (s)
153153 print (" Allocating array to test merge_perm." )
@@ -165,9 +165,9 @@ def OP_represent(int n, merges, perm):
165165 print (" Finding:" )
166166 for i in range (n):
167167 j = OP_find(OP, i)
168- s = " %d -> %d " % (i, j)
168+ s = " %d -> %d " % (i, j)
169169 if i == j:
170- s += " , root: size=%d , mcr=%d , rank=%d " % \
170+ s += " , root: size=%d , mcr=%d , rank=%d " % \
171171 (OP.size[i], OP.mcr[i], OP.rank[i])
172172 print (s)
173173 print (" Deallocating OrbitPartition." )
@@ -474,7 +474,7 @@ def PS_represent(partition, splits):
474474 print (PS.entries[i], PS.levels[i], i, n)
475475 good = False
476476 if not (PS.entries[n- 1 ] == n- 1 and PS.levels[n- 1 ] == - 1 ):
477- print (" Failed at i = %d !" % (n- 1 ))
477+ print (" Failed at i = %d !" % (n- 1 ))
478478 good = False
479479 if not PS.degree == n or not PS.depth == 0 :
480480 print (" Incorrect degree or depth!" )
@@ -486,8 +486,8 @@ def PS_represent(partition, splits):
486486 print (" Creating PartitionStack from partition %s ." % partition)
487487 PS = PS_from_list(partition)
488488 print (" PartitionStack's data:" )
489- print (" entries -> %s " % [PS.entries[i] for i in range (n)])
490- print (" levels -> %s " % [PS.levels[i] for i in range (n)])
489+ print (" entries -> %s " % [PS.entries[i] for i in range (n)])
490+ print (" levels -> %s " % [PS.levels[i] for i in range (n)])
491491 print (" depth = %d , degree = %d " % (PS.depth,PS.degree))
492492 PS_print(PS)
493493 print (" Checking PS_is_discrete:" )
@@ -506,7 +506,7 @@ def PS_represent(partition, splits):
506506 good = True
507507 for i in range (n):
508508 if PS.entries[i] != PS2.entries[i] or PS.levels[i] != PS2.levels[i]:
509- print (" Failed at i = %d !" % i)
509+ print (" Failed at i = %d !" % i)
510510 good = False
511511 if PS.degree != PS2.degree or PS.depth != PS2.depth:
512512 print (" Failure with degree or depth!" )
@@ -517,7 +517,7 @@ def PS_represent(partition, splits):
517517 PS_clear(PS2)
518518 PS_print(PS2)
519519 for s in splits:
520- print (" Splitting point %d from original:" % s)
520+ print (" Splitting point %d from original:" % s)
521521 print (PS_split_point(PS, s))
522522 PS_print(PS)
523523 print (" Getting permutation from PS2->PS:" )
@@ -528,7 +528,7 @@ def PS_represent(partition, splits):
528528 print (" Finding first smallest:" )
529529 bitset_init(b, n)
530530 i = PS_first_smallest(PS, b)
531- print (" Minimal element is %d , bitset is:" % i)
531+ print (" Minimal element is %d , bitset is:" % i)
532532 print (bitset_string(b))
533533 bitset_free(b)
534534 print (" Finding element 1:" )
@@ -1187,7 +1187,7 @@ cdef bint SC_is_giant(int n, int num_perms, int *perms, float p, bitset_t suppor
11871187 # get a bit lost in the group, so our random elements are more random:
11881188 SC_identify(perm, n)
11891189 for i from 0 <= i < 10 :
1190- SC_mult_perms(perm, perm, perms + n* (rand()% num_perms), n)
1190+ SC_mult_perms(perm, perm, perms + n* (rand() % num_perms), n)
11911191
11921192 # look for elements with cycles of prime length q, m/2 < q < m-2
11931193 num_steps = < int > ceil(- log(1 - p)* log(m)/ log(2 ))
@@ -1203,7 +1203,7 @@ cdef bint SC_is_giant(int n, int num_perms, int *perms, float p, bitset_t suppor
12031203 sig_free(perm)
12041204 OP_dealloc(OP)
12051205 return True
1206- SC_mult_perms(perm, perm, perms + n* (rand()% num_perms), n)
1206+ SC_mult_perms(perm, perm, perms + n* (rand() % num_perms), n)
12071207 OP_dealloc(OP)
12081208 sig_free(perm)
12091209 return False
@@ -1421,21 +1421,21 @@ def SC_test_list_perms(list L, int n, int limit, bint gap, bint limit_complain,
14211421 m = bitset_len(giant_support)
14221422 from sage.arith.misc import factorial
14231423 if not (order == factorial(m) or order == factorial(m)/ 2 ):
1424- print (" SC_is_giant failed: %s %s " % (str (L), order))
1424+ print (" SC_is_giant failed: %s %s " % (str (L), order))
14251425 raise AssertionError
14261426 if order == factorial(n):
14271427 SC_dealloc(SC)
14281428 SC = SC_symmetric_group(n)
14291429 SC_order(SC,0 ,order.value)
14301430 if not order == factorial(n):
1431- print (" SC_symmetric_group failed: %s %s " % (str (L), order))
1431+ print (" SC_symmetric_group failed: %s %s " % (str (L), order))
14321432 raise AssertionError
14331433 elif order == factorial(n)/ 2 :
14341434 SC_dealloc(SC)
14351435 SC = SC_alternating_group(n)
14361436 SC_order(SC,0 ,order.value)
14371437 if not order == factorial(n)/ 2 :
1438- print (" SC_alternating_group failed: %s %s " % (str (L), order))
1438+ print (" SC_alternating_group failed: %s %s " % (str (L), order))
14391439 raise AssertionError
14401440 order2 = Integer(0 )
14411441 SC_order(SCC,0 ,order2.value)
@@ -1540,8 +1540,8 @@ def SC_test_list_perms(list L, int n, int limit, bint gap, bint limit_complain,
15401540 if SC_is_giant(n, len (L), perm, 0.9 , giant_support):
15411541 from sage.arith.misc import factorial
15421542 m = bitset_len(giant_support)
1543- if order != factorial(m) and order != factorial(m)/ 2 :
1544- print (" SC_is_giant failed: %s %s " % (str (L), order))
1543+ if order != factorial(m) and order != factorial(m)// 2 :
1544+ print (" SC_is_giant failed: %s %s " % (str (L), order))
15451545 raise AssertionError
15461546 if order != G.order():
15471547 print (" FAIL {}" .format(L))
@@ -1572,13 +1572,13 @@ def SC_test_list_perms(list L, int n, int limit, bint gap, bint limit_complain,
15721572 if bool (SC_says) != bool (gap_says):
15731573 print (" FAIL {}" .format(L))
15741574 print (' element {}' .format(permy))
1575- print (' GAP says %d , SC_contains(modify=0) says %d ' % (gap_says, SC_says))
1575+ print (' GAP says %d , SC_contains(modify=0) says %d ' % (gap_says, SC_says))
15761576 raise AssertionError
15771577 SC_says = SC_contains(SC, 0 , perm, 1 )
15781578 if bool (SC_says) != bool (gap_says):
15791579 print (" FAIL {}" .format(L))
15801580 print (' element {}' .format(permy))
1581- print (' GAP says %d , SC_contains(modify=0) says %d ' % (gap_says, SC_says))
1581+ print (' GAP says %d , SC_contains(modify=0) says %d ' % (gap_says, SC_says))
15821582 raise AssertionError
15831583 SC_random_element(SC, 0 , perm)
15841584 for j from 0 <= j < n:
0 commit comments