1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-11-19 06:30:29 +01:00

adjust to changes in replace_all

This commit is contained in:
kalmar 2017-07-06 09:19:15 +02:00
parent 18ad0a04b6
commit e0af8ded6e
2 changed files with 7 additions and 2 deletions

View File

@ -365,7 +365,12 @@ function replace_all!{T}(W::GWord{T}, subst_dict::Dict{GWord{T}, GWord{T}})
return modified
end
replace_all{T<:GSymbol}(W::GWord{T}, subst_dict::Dict{GWord{T}, GWord{T}}) = replace_all!(deepcopy(W), subst_dict)
function replace_all{T<:GSymbol}(W::GWord{T},
subst_dict::Dict{GWord{T}, GWord{T}})
W = deepcopy(W)
replace_all!(W, subst_dict)
return W
end
###############################################################################
#

View File

@ -131,7 +131,7 @@ end
@test Groups.replace(c, 1, w, subst[w]) == s*t^-1
@test Groups.replace(s*c*t^-1, 1, w, subst[w]) == s^2*t^-2
@test Groups.replace(t*c*t, 2, w, subst[w]) == t*s
@test Groups.replace_all!(s*c*s*c*s, subst) == s*t^4*s*t^4*s
@test Groups.replace_all(s*c*s*c*s, subst) == s*t^4*s*t^4*s
G = FreeGroup(["x", "y"])
x,y = Nemo.gens(G)