Skip to content

Commit

Permalink
Update permutation.py
Browse files Browse the repository at this point in the history
detail
  • Loading branch information
fchapoton authored Oct 30, 2023
1 parent 3a07967 commit 83242ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/sage/combinat/permutation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5459,12 +5459,12 @@ def merging_cycles(list_of_cycles):

def rewind(L, n):
"""
Construct the list M such that M[(j*n)%(len(M))] == L[j].
Construct the list M such that ``M[(j * n) % len(M)] == L[j]``.
"""
M = [0] * len(L)
m = len(M)
for j in range(m):
M[(j*n) % m] = L[j]
M[(j * n) % m] = L[j]
return M

if n < 1:
Expand All @@ -5480,7 +5480,7 @@ def rewind(L, n):
cycles[lc] = []
cycles[lc].append(c)

# for each length m, collects all product of cycles which n-th power gives the product prod(Cycles[l])
# for each length m, collects all product of cycles which n-th power gives the product prod(cycles[l])
possibilities = [[] for m in cycles]
for i, m in enumerate(cycles):
N = len(cycles[m])
Expand Down

0 comments on commit 83242ee

Please sign in to comment.