mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2024-11-19 06:30:29 +01:00
move normalform! to equality_data
heuristic: compute normalform! only if length of automorphism is greater than 8
This commit is contained in:
parent
6405a1868e
commit
f4858fba14
@ -42,12 +42,10 @@ function Base.:(==)(g::A, h::A) where A<:FPGroupElement{<:AutomorphismGroup}
|
||||
hash(g) != hash(h) && return false
|
||||
end
|
||||
|
||||
normalform!(g)
|
||||
normalform!(h)
|
||||
word(g) == word(h) && return true
|
||||
length(word(g)) > 8 && normalform!(g)
|
||||
length(word(h)) > 8 && normalform!(h)
|
||||
|
||||
@assert isnormalform(g)
|
||||
@assert isnormalform(h)
|
||||
word(g) == word(h) && return true
|
||||
|
||||
img_computed, imh_computed = false, false
|
||||
|
||||
|
@ -35,7 +35,6 @@ function _update_savedhash!(g::FPGroupElement, data)
|
||||
end
|
||||
|
||||
function Base.hash(g::FPGroupElement, h::UInt)
|
||||
normalform!(g)
|
||||
_isvalidhash(g) || _update_savedhash!(g, equality_data(g))
|
||||
return hash(g.savedhash >> count_ones(__BITFLAGS_MASK) , h)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user