add missing normalform! before hashing

This commit is contained in:
Marek Kaluba 2023-05-25 11:57:32 +02:00
parent 7230106bfc
commit 93a841359b
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15
2 changed files with 2 additions and 2 deletions

View File

@ -37,6 +37,7 @@ function _update_savedhash!(g::AbstractFPGroupElement, data)
end
function Base.hash(g::AbstractFPGroupElement, h::UInt)
g = normalform!(g)
_isvalidhash(g) || _update_savedhash!(g, equality_data(g))
return hash(g.savedhash >> count_ones(__BITFLAGS_MASK), h)
end

View File

@ -26,8 +26,7 @@ function wlmetric_ball(
new = collect(
op(o, s) for o in @view(ball[sizes[end-1]:end]) for s in S
)
append!(ball, new)
unique!(ball)
ball = union!(ball, new)
push!(sizes, length(ball))
end
end