From 189850858f0fe6e06da41180906a16f35daeaa8a Mon Sep 17 00:00:00 2001 From: kalmarek Date: Wed, 25 Mar 2020 00:38:07 +0100 Subject: [PATCH] add to syllables commit --- src/Groups.jl | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/Groups.jl b/src/Groups.jl index 363c0d4..3840b96 100644 --- a/src/Groups.jl +++ b/src/Groups.jl @@ -216,17 +216,10 @@ end # ############################################################################### -function (==)(W::GWord, Z::GWord) - parent(W) == parent(Z) || return false - - W.modified && reduce!(W) - Z.modified && reduce!(Z) - - if W.savedhash != Z.savedhash - return false - end - - return W.symbols == Z.symbols +function (==)(W::T, Z::T) where T <: GWord + parent(W) != parent(Z) && return false + hash(W) != hash(Z) && return false + return syllables(W) == syllables(Z) end function (==)(s::GSymbol, t::GSymbol)