From 6ecf660cde9af0d8ea3bf924ffa5cd842a724bdb Mon Sep 17 00:00:00 2001 From: Maxime Vorwerk Date: Fri, 25 Aug 2023 16:53:57 +0200 Subject: [PATCH] remove hashing, no use --- julia/ImmutableOrientedShape.jl | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/julia/ImmutableOrientedShape.jl b/julia/ImmutableOrientedShape.jl index dbd6316..089b7bb 100644 --- a/julia/ImmutableOrientedShape.jl +++ b/julia/ImmutableOrientedShape.jl @@ -1,20 +1,11 @@ +include("Shape.jl") +using XXhash struct ImmutableOrientedShape cubes::Vector{Tuple{Int8, Int8, Int8}} hash::UInt end -Base.hash(S::ImmutableOrientedShape) = S.hash -Base.hash(S::ImmutableOrientedShape, h::UInt) = S.hash ⊻ h - -function Base.==(X::ImmutableOrientedShape, Y::ImmutableOrientedShape) - if hash != hash - return false - elseif X.cubes == Y.cubes - return false - else - return true - end +function getImmutableOrientedShape(S::Shape) + shape = ImmutableOrientedShape(S.orderedLists[1], xxh3_64(S.orderedLists[1])) end - -Base.isequal(X:ImmutableOrientedShape, Y::ImmutableOrientedShape) = X == Y