From 77c38be29fb59ac8a5583d2d01e2e36230f1830d Mon Sep 17 00:00:00 2001
From: David Rosca <roscadav@fit.cvut.cz>
Date: Sun, 15 Nov 2015 17:55:44 +0100
Subject: [PATCH] DirectedEdge/UndirectedEdge: Add operator >

---
 alib2data/src/graph/directed/DirectedEdge.cpp     | 4 ++++
 alib2data/src/graph/directed/DirectedEdge.h       | 1 +
 alib2data/src/graph/undirected/UndirectedEdge.cpp | 4 ++++
 alib2data/src/graph/undirected/UndirectedEdge.h   | 1 +
 4 files changed, 10 insertions(+)

diff --git a/alib2data/src/graph/directed/DirectedEdge.cpp b/alib2data/src/graph/directed/DirectedEdge.cpp
index cfc57db294..814355da3f 100644
--- a/alib2data/src/graph/directed/DirectedEdge.cpp
+++ b/alib2data/src/graph/directed/DirectedEdge.cpp
@@ -69,6 +69,10 @@ bool DirectedEdge::operator < (const DirectedEdge& other) const {
 	return this->compare(other) < 0;
 }
 
+bool DirectedEdge::operator > (const DirectedEdge& other) const {
+	return this->compare(other) > 0;
+}
+
 bool DirectedEdge::operator == (const DirectedEdge& other) const {
 	return this->compare(other) == 0;
 }
diff --git a/alib2data/src/graph/directed/DirectedEdge.h b/alib2data/src/graph/directed/DirectedEdge.h
index b8680dbb3d..8ab4b3f165 100644
--- a/alib2data/src/graph/directed/DirectedEdge.h
+++ b/alib2data/src/graph/directed/DirectedEdge.h
@@ -29,6 +29,7 @@ public:
 	const label::Label &getName() const;
 
 	bool operator < (const DirectedEdge& other) const;
+	bool operator > (const DirectedEdge& other) const;
 	bool operator == (const DirectedEdge& other) const;
 	bool operator != (const DirectedEdge& other) const;
 	int compare(const DirectedEdge &other) const;
diff --git a/alib2data/src/graph/undirected/UndirectedEdge.cpp b/alib2data/src/graph/undirected/UndirectedEdge.cpp
index c1d81e73bb..7586259609 100644
--- a/alib2data/src/graph/undirected/UndirectedEdge.cpp
+++ b/alib2data/src/graph/undirected/UndirectedEdge.cpp
@@ -74,6 +74,10 @@ bool UndirectedEdge::operator < (const UndirectedEdge& other) const {
 	return this->compare(other) < 0;
 }
 
+bool UndirectedEdge::operator > (const UndirectedEdge& other) const {
+	return this->compare(other) > 0;
+}
+
 bool UndirectedEdge::operator == (const UndirectedEdge& other) const {
 	return this->compare(other) == 0;
 }
diff --git a/alib2data/src/graph/undirected/UndirectedEdge.h b/alib2data/src/graph/undirected/UndirectedEdge.h
index 255f7b30ac..5a25b68dbb 100644
--- a/alib2data/src/graph/undirected/UndirectedEdge.h
+++ b/alib2data/src/graph/undirected/UndirectedEdge.h
@@ -29,6 +29,7 @@ public:
 	const label::Label &getName() const;
 
 	bool operator < (const UndirectedEdge& other) const;
+	bool operator > (const UndirectedEdge& other) const;
 	bool operator == (const UndirectedEdge& other) const;
 	bool operator != (const UndirectedEdge& other) const;
 	int compare(const UndirectedEdge &other) const;
-- 
GitLab