diff --git a/Geo/MEdge.h b/Geo/MEdge.h index 087dcd08d537232e02350dbdeb870bf6d0959fc7..344f81304e045ed7e51dffd6f566998d688db9a7 100644 --- a/Geo/MEdge.h +++ b/Geo/MEdge.h @@ -65,6 +65,14 @@ class MEdge { } }; +//--Operators for comparing edges + +inline bool operator!=(const MEdge &e1, const MEdge &e2) +{ + return (e1.getMinVertex() != e2.getMinVertex() || + e1.getMaxVertex() != e2.getMaxVertex()); +} + //--The following function objects compare the addresses of the mesh vertices. //--Equal, Less, and a Hash are defined. @@ -76,14 +84,6 @@ struct Equal_Edge : public std::binary_function<MEdge, MEdge, bool> { } }; -struct Equal_EdgePtr : public std::binary_function<MEdge*, MEdge*, bool> { - bool operator()(const MEdge *const e1, const MEdge *const e2) const - { - return (e1->getMinVertex() == e2->getMinVertex() && - e1->getMaxVertex() == e2->getMaxVertex()); - } -}; - struct Less_Edge : public std::binary_function<MEdge, MEdge, bool> { bool operator()(const MEdge &e1, const MEdge &e2) const { @@ -94,16 +94,6 @@ struct Less_Edge : public std::binary_function<MEdge, MEdge, bool> { } }; -struct Less_EdgePtr : public std::binary_function<MEdge*, MEdge*, bool> { - bool operator()(const MEdge *const e1, const MEdge *const e2) const - { - if(e1->getMinVertex() < e2->getMinVertex()) return true; - if(e1->getMinVertex() > e2->getMinVertex()) return false; - if(e1->getMaxVertex() < e2->getMaxVertex()) return true; - return false; - } -}; - struct Hash_Edge : public std::unary_function<MEdge, size_t> { size_t operator()(const MEdge &e) const { @@ -114,14 +104,4 @@ struct Hash_Edge : public std::unary_function<MEdge, size_t> { } }; -struct Hash_EdgePtr : public std::unary_function<MEdge*, size_t> { - size_t operator()(const MEdge *const e) const - { - const MVertex *v[2]; - v[0] = e->getMinVertex(); - v[1] = e->getMaxVertex(); - return HashFNV1a<sizeof(MVertex*[2])>::eval(v); - } -}; - #endif