1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-11 15:01:27 +01:00

move getperm

This commit is contained in:
kalmarek 2017-10-27 16:13:45 +02:00
parent 0144c49372
commit 329e481d24

View File

@ -119,15 +119,6 @@ function perm_autsymbol(a::Vector{Int})
return perm_autsymbol(G(a)) return perm_autsymbol(G(a))
end end
function getperm(s::AutSymbol)
if s.ex.args[1] == :σ
p = s.ex.args[2]
return PermutationGroup(length(p))(p)
else
throw(ArgumentError("$s is not a permutation automorphism!"))
end
end
############################################################################### ###############################################################################
# #
# AutGroup / AutGroupElem constructors # AutGroup / AutGroupElem constructors
@ -286,6 +277,10 @@ inv(f::AutSymbol) = change_pow(f, -f.pow)
############################################################################### ###############################################################################
ispermauto(s::AutSymbol) = s.ex.args[1] == :σ ispermauto(s::AutSymbol) = s.ex.args[1] == :σ
function getperm(s::AutSymbol)
isa(s.typ, PermAut) || throw("$s is not a permutation automorphism")
return s.typ.p
end
function simplify_perms!(W::AutGroupElem) function simplify_perms!(W::AutGroupElem)
reduced = true reduced = true