remove hashing, no use
This commit is contained in:
@@ -1,20 +1,11 @@
|
|||||||
|
include("Shape.jl")
|
||||||
|
using XXhash
|
||||||
|
|
||||||
struct ImmutableOrientedShape
|
struct ImmutableOrientedShape
|
||||||
cubes::Vector{Tuple{Int8, Int8, Int8}}
|
cubes::Vector{Tuple{Int8, Int8, Int8}}
|
||||||
hash::UInt
|
hash::UInt
|
||||||
end
|
end
|
||||||
|
|
||||||
Base.hash(S::ImmutableOrientedShape) = S.hash
|
function getImmutableOrientedShape(S::Shape)
|
||||||
Base.hash(S::ImmutableOrientedShape, h::UInt) = S.hash ⊻ h
|
shape = ImmutableOrientedShape(S.orderedLists[1], xxh3_64(S.orderedLists[1]))
|
||||||
|
|
||||||
function Base.==(X::ImmutableOrientedShape, Y::ImmutableOrientedShape)
|
|
||||||
if hash != hash
|
|
||||||
return false
|
|
||||||
elseif X.cubes == Y.cubes
|
|
||||||
return false
|
|
||||||
else
|
|
||||||
return true
|
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
Base.isequal(X:ImmutableOrientedShape, Y::ImmutableOrientedShape) = X == Y
|
|
||||||
|
|||||||
Reference in New Issue
Block a user