mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-26 18:30:29 +01:00
fix the AutGroup constructor
This commit is contained in:
parent
51b7b7a748
commit
e8ffc55b72
@ -106,19 +106,23 @@ end
|
|||||||
|
|
||||||
function AutGroup(G::FreeGroup; outer=false, special=false)
|
function AutGroup(G::FreeGroup; outer=false, special=false)
|
||||||
n = length(G.gens)
|
n = length(G.gens)
|
||||||
|
n == 0 && return AutGroup(G, AutSymbol[])
|
||||||
|
S = AutSymbol[]
|
||||||
indexing = [[i,j] for i in 1:n for j in 1:n if i≠j]
|
indexing = [[i,j] for i in 1:n for j in 1:n if i≠j]
|
||||||
rmuls = [rmul_autsymbol(i,j) for (i,j) in indexing]
|
rmuls = [rmul_autsymbol(i,j) for (i,j) in indexing]
|
||||||
|
append!(S, rmuls)
|
||||||
lmuls = [lmul_autsymbol(i,j) for (i,j) in indexing]
|
lmuls = [lmul_autsymbol(i,j) for (i,j) in indexing]
|
||||||
S = [rmuls..., lmuls...]
|
append!(S, lmuls)
|
||||||
if special
|
if !special
|
||||||
flips = [flip_autsymbol(i) for i in 1:n]
|
flips = [flip_autsymbol(i) for i in 1:n]
|
||||||
append!(S, flips...)
|
append!(S, flips)
|
||||||
elseif outer
|
end
|
||||||
|
if !outer
|
||||||
perms = collect(elements(PermutationGroup(n)))
|
perms = collect(elements(PermutationGroup(n)))
|
||||||
perms = [perm_autsymbol(p) for p in perms[2:end]] # leave the identity
|
perms = [perm_autsymbol(p) for p in perms[2:end]] # leave the identity
|
||||||
append!(S, perms)
|
append!(S, perms)
|
||||||
end
|
end
|
||||||
return new(G, S)
|
return AutGroup(G, S)
|
||||||
end
|
end
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user