mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-04 02:50:28 +01:00
rewrite/fix deepcopy_internal
This commit is contained in:
parent
a33b871754
commit
ba6d58ec77
12
src/types.jl
12
src/types.jl
@ -124,13 +124,11 @@ function Base.:(==)(g::AbstractFPGroupElement, h::AbstractFPGroupElement)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function Base.deepcopy_internal(g::FPGroupElement, stackdict::IdDict)
|
function Base.deepcopy_internal(g::FPGroupElement, stackdict::IdDict)
|
||||||
haskey(stackdict, objectid(g)) && return stackdict[objectid(g)]
|
haskey(stackdict, g) && return stackdict[g]
|
||||||
cw = if haskey(stackdict, objectid(word(g)))
|
cw = Base.deepcopy_internal(word(g), stackdict)
|
||||||
stackdict[objectid(word(g))]
|
h = FPGroupElement(cw, parent(g), g.savedhash)
|
||||||
else
|
stackdict[g] = h
|
||||||
copy(word(g))
|
return h
|
||||||
end
|
|
||||||
return FPGroupElement(cw, parent(g), g.savedhash)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function Base.inv(g::GEl) where {GEl<:AbstractFPGroupElement}
|
function Base.inv(g::GEl) where {GEl<:AbstractFPGroupElement}
|
||||||
|
Loading…
Reference in New Issue
Block a user