[Lemon-commits] [lemon_svn] deba: r2680 - hugo/trunk/lemon/bits

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:54:26 CET 2006


Author: deba
Date: Fri Apr  7 11:52:30 2006
New Revision: 2680

Modified:
   hugo/trunk/lemon/bits/graph_adaptor_extender.h

Log:
Forgotten functions in the graph adaptor extenders.



Modified: hugo/trunk/lemon/bits/graph_adaptor_extender.h
==============================================================================
--- hugo/trunk/lemon/bits/graph_adaptor_extender.h	(original)
+++ hugo/trunk/lemon/bits/graph_adaptor_extender.h	Fri Apr  7 11:52:30 2006
@@ -720,6 +720,24 @@
       return e.direction ? target(e) : source(e);
     }
 
+    Node oppositeNode(const Node &n, const UEdge &e) const {
+      if( n == Parent::source(e))
+	return Parent::target(e);
+      else if( n == Parent::target(e))
+	return Parent::source(e);
+      else
+	return INVALID;
+    }
+
+    Edge oppositeEdge(const Edge &e) const {
+      return Parent::direct(e, !Parent::direction(e));
+    }
+
+    using Parent::direct;
+    Edge direct(const UEdge &ue, const Node &s) const {
+      return Parent::direct(ue, Parent::source(ue) == s);
+    }
+
   };
 
 



More information about the Lemon-commits mailing list