[Lemon-commits] [lemon_svn] alpar: r142 - hugo/trunk/src/work

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


Author: alpar
Date: Fri Feb 20 22:59:34 2004
New Revision: 142

Modified:
   hugo/trunk/src/work/edmonds_karp.hh
   hugo/trunk/src/work/flow_test.cc
   hugo/trunk/src/work/iterator_bfs_demo.cc
   hugo/trunk/src/work/iterator_bfs_dfs_demo.cc
   hugo/trunk/src/work/list_graph.hh
   hugo/trunk/src/work/marci_bfs.hh
   hugo/trunk/src/work/marci_graph_demo.cc
   hugo/trunk/src/work/marci_graph_traits.hh
   hugo/trunk/src/work/marci_list_graph.hh
   hugo/trunk/src/work/marci_max_flow.hh
   hugo/trunk/src/work/marci_property_vector.hh

Log:
marci -> hugo
resize -> update


Modified: hugo/trunk/src/work/edmonds_karp.hh
==============================================================================
--- hugo/trunk/src/work/edmonds_karp.hh	(original)
+++ hugo/trunk/src/work/edmonds_karp.hh	Fri Feb 20 22:59:34 2004
@@ -8,7 +8,7 @@
 #include <bfs_iterator.hh>
 #include <time_measure.h>
 
-namespace marci {
+namespace hugo {
 
   template<typename Graph, typename Number, typename FlowMap, typename CapacityMap>
   class ResGraph {
@@ -540,8 +540,8 @@
     //FIXME
     void set(NodeIt nit, T a) { container[G.id(nit)]=a; }
     T get(NodeIt nit) const { return container[G.id(nit)]; }
-    //void resize() { container.resize(G.node_id); }
-    //void resize(T a) { container.resize(G.node_id, a); }
+    //void update() { container.resize(G.node_id); }
+    //void update(T a) { container.resize(G.node_id, a); }
   };
 */
 
@@ -646,6 +646,6 @@
 
 
 
-} // namespace marci
+} // namespace hugo
 
 #endif //EDMONDS_KARP_HH

Modified: hugo/trunk/src/work/flow_test.cc
==============================================================================
--- hugo/trunk/src/work/flow_test.cc	(original)
+++ hugo/trunk/src/work/flow_test.cc	Fri Feb 20 22:59:34 2004
@@ -10,7 +10,7 @@
 #include <reverse_bfs.hh>
 #include <dijkstra.hh>
 
-using namespace marci;
+using namespace hugo;
 
 
 int main (int, char*[])

Modified: hugo/trunk/src/work/iterator_bfs_demo.cc
==============================================================================
--- hugo/trunk/src/work/iterator_bfs_demo.cc	(original)
+++ hugo/trunk/src/work/iterator_bfs_demo.cc	Fri Feb 20 22:59:34 2004
@@ -6,7 +6,7 @@
 #include <bfs_iterator.hh>
 #include <graph_wrapper.h>
 
-using namespace marci;
+using namespace hugo;
 
 int main (int, char*[])
 {

Modified: hugo/trunk/src/work/iterator_bfs_dfs_demo.cc
==============================================================================
--- hugo/trunk/src/work/iterator_bfs_dfs_demo.cc	(original)
+++ hugo/trunk/src/work/iterator_bfs_dfs_demo.cc	Fri Feb 20 22:59:34 2004
@@ -5,7 +5,7 @@
 #include <list_graph.hh>
 #include <bfs_iterator.hh>
 
-using namespace marci;
+using namespace hugo;
 
 int main (int, char*[])
 {

Modified: hugo/trunk/src/work/list_graph.hh
==============================================================================
--- hugo/trunk/src/work/list_graph.hh	(original)
+++ hugo/trunk/src/work/list_graph.hh	Fri Feb 20 22:59:34 2004
@@ -4,7 +4,7 @@
 #include <iostream>
 #include <vector>
 
-namespace marci {
+namespace hugo {
 
   template <typename It>
   int count(It it) { 
@@ -49,8 +49,8 @@
       T get(NodeIt n) const { return container[/*G.id(n)*/n.node->id]; }
       T& operator[](NodeIt n) { return container[/*G.id(n)*/n.node->id]; }
       const T& operator[](NodeIt n) const { return container[/*G.id(n)*/n.node->id]; }
-      void resize() { container.resize(G.node_id); }
-      void resize(T a) { container.resize(G.node_id, a); }
+      void update() { container.resize(G.node_id); }
+      void update(T a) { container.resize(G.node_id, a); }
     };
 
     template <typename T>
@@ -67,8 +67,8 @@
       T get(EdgeIt e) const { return container[/*G.id(e)*/e.edge->id]; }
       T& operator[](EdgeIt e) { return container[/*G.id(e)*/e.edge->id]; } 
       const T& operator[](EdgeIt e) const { return container[/*G.id(e)*/e.edge->id]; } 
-      void resize() { container.resize(G.edge_id); }
-      void resize(T a) { container.resize(G.edge_id, a); }
+      void update() { container.resize(G.edge_id); }
+      void update(T a) { container.resize(G.edge_id, a); }
     };
 
     int node_id;
@@ -306,7 +306,7 @@
     bool valid(NodeIt n) const { return n.valid(); }
     
     template <typename It> It next(It it) const { 
-      It tmp(it); return goNext(it); }
+      It tmp(it); return goNext(tmp); }
     template <typename It> It& goNext(It& it) const { return ++it; }
    
 
@@ -508,46 +508,44 @@
 
   };
 
-  /*
-  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::EachNodeIt ListGraph::first<ListGraph::EachNodeIt>() const { 
-    return firstNode(); 
-  }
-
-  template<>
-  ListGraph::EachEdgeIt ListGraph::first<ListGraph::EachEdgeIt>() const { 
-    return firstEdge(); 
-  }
-
-  template< typename T >
-  T ListGraph::first(ListGraph::NodeIt v) const {
-    std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>(ListGRaph::NodeIt);" << std::endl; 
-    return T(); 
-  } 
-
-  template<>
-  ListGraph::OutEdgeIt ListGraph::first<ListGraph::OutEdgeIt>(const ListGraph::NodeIt v) const { 
-    return firstOutEdge(v); 
-  }
-
-  template<>
-  ListGraph::InEdgeIt ListGraph::first<ListGraph::InEdgeIt>(const ListGraph::NodeIt v) const { 
-    return firstInEdge(v); 
-  }
-
-  template<>
-  ListGraph::SymEdgeIt ListGraph::first<ListGraph::SymEdgeIt>(const ListGraph::NodeIt v) const { 
-    return firstSymEdge(v); 
-  }
-  */
+//   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::EachNodeIt ListGraph::first<ListGraph::EachNodeIt>() const { 
+//     return firstNode(); 
+//   }
+
+//   template<>
+//   ListGraph::EachEdgeIt ListGraph::first<ListGraph::EachEdgeIt>() const { 
+//     return firstEdge(); 
+//   }
+
+//   template< typename T >
+//   T ListGraph::first(ListGraph::NodeIt v) const {
+//     std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>(ListGRaph::NodeIt);" << std::endl; 
+//     return T(); 
+//   } 
+
+//   template<>
+//   ListGraph::OutEdgeIt ListGraph::first<ListGraph::OutEdgeIt>(const ListGraph::NodeIt v) const { 
+//     return firstOutEdge(v); 
+//   }
+
+//   template<>
+//   ListGraph::InEdgeIt ListGraph::first<ListGraph::InEdgeIt>(const ListGraph::NodeIt v) const { 
+//     return firstInEdge(v); 
+//   }
+
+//   template<>
+//   ListGraph::SymEdgeIt ListGraph::first<ListGraph::SymEdgeIt>(const ListGraph::NodeIt v) const { 
+//     return firstSymEdge(v); 
+//   }
 
 
-} //namespace marci
+} //namespace hugo
 
 #endif //LIST_GRAPH_HH

Modified: hugo/trunk/src/work/marci_bfs.hh
==============================================================================
--- hugo/trunk/src/work/marci_bfs.hh	(original)
+++ hugo/trunk/src/work/marci_bfs.hh	Fri Feb 20 22:59:34 2004
@@ -5,7 +5,7 @@
 
 #include <marci_property_vector.hh>
 
-namespace marci {
+namespace hugo {
 
   template <typename graph_type>
   struct bfs {
@@ -171,6 +171,6 @@
 
   };
 
-} // namespace marci
+} // namespace hugo
 
 #endif //MARCI_BFS_HH

Modified: hugo/trunk/src/work/marci_graph_demo.cc
==============================================================================
--- hugo/trunk/src/work/marci_graph_demo.cc	(original)
+++ hugo/trunk/src/work/marci_graph_demo.cc	Fri Feb 20 22:59:34 2004
@@ -6,7 +6,7 @@
 #include <bfs_iterator.hh>
 #include <edmonds_karp.hh>
 
-using namespace marci;
+using namespace hugo;
 
 int main (int, char*[])
 {

Modified: hugo/trunk/src/work/marci_graph_traits.hh
==============================================================================
--- hugo/trunk/src/work/marci_graph_traits.hh	(original)
+++ hugo/trunk/src/work/marci_graph_traits.hh	Fri Feb 20 22:59:34 2004
@@ -1,7 +1,7 @@
 #ifndef MARCI_GRAPH_TRAITS_HH
 #define MARCI_GRAPH_TRAITS_HH
 
-namespace marci {
+namespace hugo {
 
   template <typename graph_type>
   struct graph_traits {
@@ -14,6 +14,6 @@
     typedef typename graph_type::sym_edge_iterator sym_edge_iterator;
   };
 
-} // namespace marci
+} // namespace hugo
 
 #endif //MARCI_GRAPH_TRAITS_HH

Modified: hugo/trunk/src/work/marci_list_graph.hh
==============================================================================
--- hugo/trunk/src/work/marci_list_graph.hh	(original)
+++ hugo/trunk/src/work/marci_list_graph.hh	Fri Feb 20 22:59:34 2004
@@ -3,7 +3,7 @@
 
 #include <iostream>
 
-namespace marci {
+namespace hugo {
 
   class list_graph {
     class node_item;
@@ -338,6 +338,6 @@
 
 
 
-} //namespace marci
+} //namespace hugo
 
 #endif //MARCI_LIST_GRAPH_HH

Modified: hugo/trunk/src/work/marci_max_flow.hh
==============================================================================
--- hugo/trunk/src/work/marci_max_flow.hh	(original)
+++ hugo/trunk/src/work/marci_max_flow.hh	Fri Feb 20 22:59:34 2004
@@ -6,7 +6,7 @@
 #include <marci_property_vector.hh>
 #include <marci_bfs.hh>
 
-namespace marci {
+namespace hugo {
 
   template<typename graph_type, typename T>
   class res_graph_type { 
@@ -178,6 +178,6 @@
     }
   };
 
-} // namespace marci
+} // namespace hugo
 
 #endif //MARCI_MAX_FLOW_HH

Modified: hugo/trunk/src/work/marci_property_vector.hh
==============================================================================
--- hugo/trunk/src/work/marci_property_vector.hh	(original)
+++ hugo/trunk/src/work/marci_property_vector.hh	Fri Feb 20 22:59:34 2004
@@ -3,7 +3,7 @@
 
 #include <vector>
 
-namespace marci {
+namespace hugo {
 
   template <typename iterator>
   int number_of(iterator _it) { 
@@ -14,8 +14,8 @@
   
   template <typename graph_type, typename T>
   class node_property_vector {
-    typedef typename list_graph::node_iterator node_iterator;
-    typedef typename list_graph::each_node_iterator each_node_iterator;
+    typedef typename graph_type::node_iterator node_iterator;
+    typedef typename graph_type::each_node_iterator each_node_iterator;
     graph_type& G; 
     std::vector<T> container;
   public:
@@ -52,6 +52,6 @@
     T get(edge_iterator eit) { return container[G.id(eit)]; }
   };
 
-} // namespace marci
+} // namespace hugo
 
 #endif //MARCI_PROPERTY_VECTOR_HH



More information about the Lemon-commits mailing list