[Lemon-commits] Peter Kovacs: Change Graph::Edge -> Graph::Arc i...

Lemon HG hg at lemon.cs.elte.hu
Mon May 11 16:36:18 CEST 2009


details:   http://lemon.cs.elte.hu/hg/lemon/rev/bf7928412136
changeset: 700:bf7928412136
user:      Peter Kovacs <kpeter [at] inf.elte.hu>
date:      Sat May 09 16:39:59 2009 +0200
description:
	Change Graph::Edge -> Graph::Arc inheritance to conversion (#283)

diffstat:

 lemon/concepts/graph.h |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (32 lines):

diff --git a/lemon/concepts/graph.h b/lemon/concepts/graph.h
--- a/lemon/concepts/graph.h
+++ b/lemon/concepts/graph.h
@@ -310,8 +310,8 @@
 
       /// The directed arc type. It can be converted to the
       /// edge or it should be inherited from the undirected
-      /// arc.
-      class Arc : public Edge {
+      /// edge.
+      class Arc {
       public:
         /// Default constructor
 
@@ -322,7 +322,7 @@
 
         /// Copy constructor.
         ///
-        Arc(const Arc& e) : Edge(e) { }
+        Arc(const Arc&) { }
         /// Initialize the iterator to be invalid.
 
         /// Initialize the iterator to be invalid.
@@ -349,6 +349,8 @@
         /// ordering of the items.
         bool operator<(Arc) const { return false; }
 
+        /// Converison to Edge
+        operator Edge() const { return Edge(); }
       };
       /// This iterator goes through each directed arc.
 



More information about the Lemon-commits mailing list