fix: PermutationGroups.Perm is no longer mutable

This commit is contained in:
Marek Kaluba 2024-02-06 13:33:21 +01:00
parent 826de34807
commit acb6b08ba9
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
1 changed files with 2 additions and 2 deletions

View File

@ -27,13 +27,13 @@ function isadjacent(
end
function _ncycle(start, length, n=start + length - 1)
p = PermutationGroups.Perm(Int8(n))
p = collect(Int8.(1:n))
@assert n start + length - 1
for k in start:start+length-2
p[k] = k + 1
end
p[start+length-1] = start
return p
return PermutationGroups.Perm(p)
end
alternating_group(n::Integer) = PermutationGroups.PermGroup([_ncycle(i, 3) for i in 1:n-2])