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

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


Author: deba
Date: Tue Apr 18 11:14:38 2006
New Revision: 2705

Modified:
   hugo/trunk/lemon/full_graph.h

Log:
Bug fix

Add missing function



Modified: hugo/trunk/lemon/full_graph.h
==============================================================================
--- hugo/trunk/lemon/full_graph.h	(original)
+++ hugo/trunk/lemon/full_graph.h	Tue Apr 18 11:14:38 2006
@@ -304,6 +304,18 @@
     ///\sa id(Edge)
     int maxEdgeId() const { return _edgeNum-1; }
 
+    /// \brief Returns the node from its \c id.
+    ///
+    /// Returns the node from its \c id. If there is not node
+    /// with the given id the effect of the function is undefinied.
+    static Node nodeFromId(int id) { return Node(id);}
+
+    /// \brief Returns the edge from its \c id.
+    ///
+    /// Returns the edge from its \c id. If there is not edge
+    /// with the given id the effect of the function is undefinied.
+    static Edge edgeFromId(int id) { return Edge(id);}
+
     Node source(Edge e) const { 
       /// \todo we may do it faster
       return Node(((int)sqrt((double)(1 + 8 * e.id)) + 1) / 2);



More information about the Lemon-commits mailing list