mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-12-25 02:05:30 +01:00
adjust to changes in replace_all
This commit is contained in:
parent
18ad0a04b6
commit
e0af8ded6e
@ -365,7 +365,12 @@ function replace_all!{T}(W::GWord{T}, subst_dict::Dict{GWord{T}, GWord{T}})
|
|||||||
return modified
|
return modified
|
||||||
end
|
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
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
|
@ -131,7 +131,7 @@ end
|
|||||||
@test Groups.replace(c, 1, w, subst[w]) == s*t^-1
|
@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(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(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"])
|
G = FreeGroup(["x", "y"])
|
||||||
x,y = Nemo.gens(G)
|
x,y = Nemo.gens(G)
|
||||||
|
Loading…
Reference in New Issue
Block a user