From e8ffc55b72cc1382e825ae7e7439afc3ad13d07b Mon Sep 17 00:00:00 2001 From: kalmar Date: Mon, 15 May 2017 09:51:03 +0200 Subject: [PATCH] fix the AutGroup constructor --- src/AutGroup.jl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/AutGroup.jl b/src/AutGroup.jl index aa2ee04..dc4766f 100644 --- a/src/AutGroup.jl +++ b/src/AutGroup.jl @@ -106,19 +106,23 @@ end function AutGroup(G::FreeGroup; outer=false, special=false) 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] rmuls = [rmul_autsymbol(i,j) for (i,j) in indexing] + append!(S, rmuls) lmuls = [lmul_autsymbol(i,j) for (i,j) in indexing] - S = [rmuls..., lmuls...] - if special + append!(S, lmuls) + if !special flips = [flip_autsymbol(i) for i in 1:n] - append!(S, flips...) - elseif outer + append!(S, flips) + end + if !outer perms = collect(elements(PermutationGroup(n))) perms = [perm_autsymbol(p) for p in perms[2:end]] # leave the identity append!(S, perms) end - return new(G, S) + return AutGroup(G, S) end ###############################################################################