1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-10-15 07:20:35 +02:00

use domain in hash and ==

This commit is contained in:
kalmarek 2018-03-17 05:09:09 +01:00
parent acb1dbe6c8
commit 181073b517

View File

@ -203,7 +203,7 @@ hash(s::AutSymbol, h::UInt) = hash(s.str, hash(s.pow, hash(:AutSymbol, h)))
function hash(g::AutGroupElem, h::UInt)
if g.modified
g.savedhash = hash(g(gens(parent(g).objectGroup)), hash(typeof(g), hash(parent(g), h)))
g.savedhash = hash(g(parent(g).domain), hash(typeof(g), hash(parent(g), h)))
g.modified = false
end
return g.savedhash
@ -253,8 +253,7 @@ end
function (==)(g::AutGroupElem, h::AutGroupElem)
parent(g) == parent(h) || return false
G = parent(g).objectGroup
gs = gens(G)
gs = parent(g).domain
return g(gs) == h(gs)
end