[Lemon-commits] [lemon_svn] marci: r479 - hugo/trunk/src/work

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


Author: marci
Date: Tue Apr 20 15:43:36 2004
New Revision: 479

Modified:
   hugo/trunk/src/work/list_graph.h

Log:
UndirListGraph, somebody should try it.


Modified: hugo/trunk/src/work/list_graph.h
==============================================================================
--- hugo/trunk/src/work/list_graph.h	(original)
+++ hugo/trunk/src/work/list_graph.h	Tue Apr 20 15:43:36 2004
@@ -505,7 +505,7 @@
       bool out_or_in; //1 iff out, 0 iff in
       //node_item* v;
       //protected:
-    public: //for alpar
+    protected: //for alpar
       SymEdgeIt(const Node& _v) /*: v(_v.node)*/ { 
 	out_or_in=1;
 	edge=_v.node->_first_out_edge; 
@@ -536,46 +536,12 @@
       Node bNode() const { 
 	return (out_or_in) ? Node(edge->_head) : Node(edge->_tail); }
     };
-
   };
 
-//   template< typename T >
-//   T ListGraph::first() const { 
-//     std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>();" << std::endl; 
-//     return T(); 
-//   }
-
-//   template<>
-//   ListGraph::NodeIt ListGraph::first<ListGraph::NodeIt>() const { 
-//     return firstNode(); 
-//   }
-
-//   template<>
-//   ListGraph::EdgeIt ListGraph::first<ListGraph::EdgeIt>() const { 
-//     return firstEdge(); 
-//   }
-
-//   template< typename T >
-//   T ListGraph::first(ListGraph::Node v) const {
-//     std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>(ListGRaph::Node);" << std::endl; 
-//     return T(); 
-//   } 
-
-//   template<>
-//   ListGraph::OutEdgeIt ListGraph::first<ListGraph::OutEdgeIt>(const ListGraph::Node v) const { 
-//     return firstOutEdge(v); 
-//   }
-
-//   template<>
-//   ListGraph::InEdgeIt ListGraph::first<ListGraph::InEdgeIt>(const ListGraph::Node v) const { 
-//     return firstInEdge(v); 
-//   }
-
-//   template<>
-//   ListGraph::SymEdgeIt ListGraph::first<ListGraph::SymEdgeIt>(const ListGraph::Node v) const { 
-//     return firstSymEdge(v); 
-//   }
-
+  class UndirListGraph : public ListGraph {
+    typedef SymEdgeIt OutEdgeIt;
+    typedef SymEdgeIt InEdgeIt;
+  };
 
 } //namespace hugo
 



More information about the Lemon-commits mailing list