mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-26 18:30:29 +01:00
separate AutGroup from AutSymbol (functional) overload
This commit is contained in:
parent
b50d7f7a9c
commit
6121c38d7f
@ -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}})
|
function (f::AutSymbol){T}(v::Vector{GWord{T}})
|
||||||
if f.pow == 0
|
if f.pow == 0
|
||||||
return v
|
return v
|
||||||
@ -145,12 +168,6 @@ function (F::AutGroupElem)(v::Vector)
|
|||||||
return v
|
return v
|
||||||
end
|
end
|
||||||
|
|
||||||
function (G::AutGroup)(f::AutSymbol)
|
|
||||||
g = AutGroupElem(f)
|
|
||||||
g.parent = G
|
|
||||||
return g
|
|
||||||
end
|
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
# Basic manipulation
|
# Basic manipulation
|
||||||
|
Loading…
Reference in New Issue
Block a user