From 0144c49372e8d70be4441e734944445c4f635038 Mon Sep 17 00:00:00 2001 From: kalmarek Date: Fri, 27 Oct 2017 16:12:28 +0200 Subject: [PATCH] AutSymbol evaluation -- much simpler due to automorphism type carried as an attribute --- src/AutGroup.jl | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/src/AutGroup.jl b/src/AutGroup.jl index 04f343a..afbbce2 100644 --- a/src/AutGroup.jl +++ b/src/AutGroup.jl @@ -186,24 +186,12 @@ end ############################################################################### function (f::AutSymbol){T}(v::Vector{GWord{T}}) - if f.pow == 0 - return v - end - if f.ex == :(id()) - func = identity(v) - elseif f.ex.args[1] == :ϱ - func = ϱ(f.ex.args[2], f.ex.args[3], f.pow) - elseif f.ex.args[1] == :λ - func = λ(f.ex.args[2], f.ex.args[3], f.pow) - elseif f.ex.args[1] == :ɛ - func = ɛ(f.ex.args[2], f.pow) - elseif f.ex.args[1] == :σ - g = PermutationGroup(length(f.ex.args[2]))(f.ex.args[2]) - func = σ(g, f.ex.args[3]) - else - throw("Unknown AutSymbol!") - end - return func(v) + if f.pow == 0 + nothing + else + v = f.typ(v, f.pow) + end + return v end function (F::AutGroupElem)(v::Vector)