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

add comment why specialized deepcopy for GWords is necessary

This commit is contained in:
kalmarek 2018-07-30 15:20:12 +02:00
parent 7f25d96038
commit d373a0c7c2

View File

@ -98,6 +98,7 @@ function hash(W::GWord, h::UInt)
return xor(W.savedhash, h) return xor(W.savedhash, h)
end end
# WARNING: Due to specialised (constant) hash function of GWords this one is actually necessary!
function deepcopy_internal(W::T, dict::ObjectIdDict) where {T<:GWord} function deepcopy_internal(W::T, dict::ObjectIdDict) where {T<:GWord}
G = parent(W) G = parent(W)
return G(T(deepcopy(W.symbols))) return G(T(deepcopy(W.symbols)))