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

move AutSymbol call overload

This commit is contained in:
kalmar 2017-05-12 19:52:27 +02:00
parent bd1208e2f8
commit bab1a64042

View File

@ -10,12 +10,6 @@ immutable AutSymbol <: GSymbol
func::Function
end
function (f::AutSymbol){T}(v::Vector{GWord{T}})
if f.pow == 0
return v
end
return f.func(v)
end
(==)(s::AutSymbol, t::AutSymbol) = s.gen == t.gen && s.pow == t.pow
hash(s::AutSymbol, h::UInt) = hash(s.gen, hash(s.pow, hash(:AutSymbol, h)))
@ -116,6 +110,12 @@ function getperm(s::AutSymbol)
end
typealias AutWord GWord{AutSymbol}
function (f::AutSymbol){T}(v::Vector{GWord{T}})
if f.pow == 0
return v
end
return f.func(v)
end
function (F::AutWord)(v)
for f in F.symbols