1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-10-15 07:20:35 +02:00

separate AutGroup from AutSymbol (functional) overload

This commit is contained in:
kalmar 2017-05-15 17:09:18 +02:00
parent b50d7f7a9c
commit 6121c38d7f

View File

@ -131,6 +131,29 @@ end
#
###############################################################################
function (G::AutGroup)()
id = AutGroupElem(id_autsymbol())
id.parent = G
return id
end
function (G::AutGroup)(f::AutSymbol)
g = AutGroupElem(f)
g.parent = G
return g
end
function (G::AutGroup)(g::AutGroupElem)
g.parent = G
return g
end
###############################################################################
#
# Functional call overloads for evaluation of AutSymbol and AutGroupElem
#
###############################################################################
function (f::AutSymbol){T}(v::Vector{GWord{T}})
if f.pow == 0
return v
@ -145,12 +168,6 @@ function (F::AutGroupElem)(v::Vector)
return v
end
function (G::AutGroup)(f::AutSymbol)
g = AutGroupElem(f)
g.parent = G
return g
end
###############################################################################
#
# Basic manipulation