mirror of
https://github.com/kalmarek/Groups.jl.git
synced 2025-01-07 13:10:28 +01:00
add missing normalform! before hashing
This commit is contained in:
parent
7230106bfc
commit
93a841359b
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user