1
0
mirror of https://github.com/kalmarek/Groups.jl.git synced 2024-12-26 02:20:30 +01:00

slightly more efficient equality_data

This commit is contained in:
Marek Kaluba 2021-05-24 01:07:59 +02:00
parent 6fba013f0b
commit 1c971cb3b1
No known key found for this signature in database
GPG Key ID: 8BF1A3855328FC15

View File

@ -32,7 +32,17 @@ function relations(G::AutomorphismGroup)
return last(gersten_relations(n, commutative = false)) return last(gersten_relations(n, commutative = false))
end end
equality_data(f::FPGroupElement{<:AutomorphismGroup}) = normalform!.(evaluate(f)) function equality_data(f::FPGroupElement{<:AutomorphismGroup})
imf = evaluate(f)
# return normalform!.(imf)
tmp = one(first(imf))
for g in imf
normalform!(tmp, g)
copyto!(g, tmp)
end
return imf
end
function Base.:(==)(g::A, h::A) where {A<:FPGroupElement{<:AutomorphismGroup}} function Base.:(==)(g::A, h::A) where {A<:FPGroupElement{<:AutomorphismGroup}}
@assert parent(g) === parent(h) @assert parent(g) === parent(h)