From b840082c197040d473b84703654ad426fa67f7cf Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 27 Mar 2022 09:02:28 +0200 Subject: [PATCH] arb:: operators for connection_t --- arbitrile.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arbitrile.cpp b/arbitrile.cpp index 8b43d5be..ac9acc52 100644 --- a/arbitrile.cpp +++ b/arbitrile.cpp @@ -26,6 +26,8 @@ struct connection_t { int eid; /** 1 if this connection mirrored, 0 otherwise. do_unmirror() removes all mirrors by doubling shapes */ int mirror; + bool operator == (const arb::connection_t& b) const { return tie(sid, eid, mirror) == tie(b.sid, b.eid, b.mirror); } + bool operator < (const arb::connection_t& b) const { return tie(sid, eid, mirror) < tie(b.sid, b.eid, b.mirror); } }; inline void print(hstream& hs, const connection_t& conn) { print(hs, tie(conn.sid, conn.eid, conn.mirror)); }