diff --git a/src/hashing.jl b/src/hashing.jl index 48593e9..642c6f2 100644 --- a/src/hashing.jl +++ b/src/hashing.jl @@ -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 diff --git a/src/wl_ball.jl b/src/wl_ball.jl index 96b5984..5834b58 100644 --- a/src/wl_ball.jl +++ b/src/wl_ball.jl @@ -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