marci -> hugo
authoralpar
Fri, 20 Feb 2004 21:59:34 +0000
changeset 1078d62f0072ff0
parent 106 0508d63fcc96
child 108 0351b00fd283
marci -> hugo
resize -> update
src/work/edmonds_karp.hh
src/work/flow_test.cc
src/work/iterator_bfs_demo.cc
src/work/iterator_bfs_dfs_demo.cc
src/work/list_graph.hh
src/work/marci_bfs.hh
src/work/marci_graph_demo.cc
src/work/marci_graph_traits.hh
src/work/marci_list_graph.hh
src/work/marci_max_flow.hh
src/work/marci_property_vector.hh
     1.1 --- a/src/work/edmonds_karp.hh	Fri Feb 20 21:57:39 2004 +0000
     1.2 +++ b/src/work/edmonds_karp.hh	Fri Feb 20 21:59:34 2004 +0000
     1.3 @@ -8,7 +8,7 @@
     1.4  #include <bfs_iterator.hh>
     1.5  #include <time_measure.h>
     1.6  
     1.7 -namespace marci {
     1.8 +namespace hugo {
     1.9  
    1.10    template<typename Graph, typename Number, typename FlowMap, typename CapacityMap>
    1.11    class ResGraph {
    1.12 @@ -540,8 +540,8 @@
    1.13      //FIXME
    1.14      void set(NodeIt nit, T a) { container[G.id(nit)]=a; }
    1.15      T get(NodeIt nit) const { return container[G.id(nit)]; }
    1.16 -    //void resize() { container.resize(G.node_id); }
    1.17 -    //void resize(T a) { container.resize(G.node_id, a); }
    1.18 +    //void update() { container.resize(G.node_id); }
    1.19 +    //void update(T a) { container.resize(G.node_id, a); }
    1.20    };
    1.21  */
    1.22  
    1.23 @@ -646,6 +646,6 @@
    1.24  
    1.25  
    1.26  
    1.27 -} // namespace marci
    1.28 +} // namespace hugo
    1.29  
    1.30  #endif //EDMONDS_KARP_HH
     2.1 --- a/src/work/flow_test.cc	Fri Feb 20 21:57:39 2004 +0000
     2.2 +++ b/src/work/flow_test.cc	Fri Feb 20 21:59:34 2004 +0000
     2.3 @@ -10,7 +10,7 @@
     2.4  #include <reverse_bfs.hh>
     2.5  #include <dijkstra.hh>
     2.6  
     2.7 -using namespace marci;
     2.8 +using namespace hugo;
     2.9  
    2.10  
    2.11  int main (int, char*[])
     3.1 --- a/src/work/iterator_bfs_demo.cc	Fri Feb 20 21:57:39 2004 +0000
     3.2 +++ b/src/work/iterator_bfs_demo.cc	Fri Feb 20 21:59:34 2004 +0000
     3.3 @@ -6,7 +6,7 @@
     3.4  #include <bfs_iterator.hh>
     3.5  #include <graph_wrapper.h>
     3.6  
     3.7 -using namespace marci;
     3.8 +using namespace hugo;
     3.9  
    3.10  int main (int, char*[])
    3.11  {
     4.1 --- a/src/work/iterator_bfs_dfs_demo.cc	Fri Feb 20 21:57:39 2004 +0000
     4.2 +++ b/src/work/iterator_bfs_dfs_demo.cc	Fri Feb 20 21:59:34 2004 +0000
     4.3 @@ -5,7 +5,7 @@
     4.4  #include <list_graph.hh>
     4.5  #include <bfs_iterator.hh>
     4.6  
     4.7 -using namespace marci;
     4.8 +using namespace hugo;
     4.9  
    4.10  int main (int, char*[])
    4.11  {
     5.1 --- a/src/work/list_graph.hh	Fri Feb 20 21:57:39 2004 +0000
     5.2 +++ b/src/work/list_graph.hh	Fri Feb 20 21:59:34 2004 +0000
     5.3 @@ -4,7 +4,7 @@
     5.4  #include <iostream>
     5.5  #include <vector>
     5.6  
     5.7 -namespace marci {
     5.8 +namespace hugo {
     5.9  
    5.10    template <typename It>
    5.11    int count(It it) { 
    5.12 @@ -49,8 +49,8 @@
    5.13        T get(NodeIt n) const { return container[/*G.id(n)*/n.node->id]; }
    5.14        T& operator[](NodeIt n) { return container[/*G.id(n)*/n.node->id]; }
    5.15        const T& operator[](NodeIt n) const { return container[/*G.id(n)*/n.node->id]; }
    5.16 -      void resize() { container.resize(G.node_id); }
    5.17 -      void resize(T a) { container.resize(G.node_id, a); }
    5.18 +      void update() { container.resize(G.node_id); }
    5.19 +      void update(T a) { container.resize(G.node_id, a); }
    5.20      };
    5.21  
    5.22      template <typename T>
    5.23 @@ -67,8 +67,8 @@
    5.24        T get(EdgeIt e) const { return container[/*G.id(e)*/e.edge->id]; }
    5.25        T& operator[](EdgeIt e) { return container[/*G.id(e)*/e.edge->id]; } 
    5.26        const T& operator[](EdgeIt e) const { return container[/*G.id(e)*/e.edge->id]; } 
    5.27 -      void resize() { container.resize(G.edge_id); }
    5.28 -      void resize(T a) { container.resize(G.edge_id, a); }
    5.29 +      void update() { container.resize(G.edge_id); }
    5.30 +      void update(T a) { container.resize(G.edge_id, a); }
    5.31      };
    5.32  
    5.33      int node_id;
    5.34 @@ -306,7 +306,7 @@
    5.35      bool valid(NodeIt n) const { return n.valid(); }
    5.36      
    5.37      template <typename It> It next(It it) const { 
    5.38 -      It tmp(it); return goNext(it); }
    5.39 +      It tmp(it); return goNext(tmp); }
    5.40      template <typename It> It& goNext(It& it) const { return ++it; }
    5.41     
    5.42  
    5.43 @@ -508,46 +508,44 @@
    5.44  
    5.45    };
    5.46  
    5.47 -  /*
    5.48 -  template< typename T >
    5.49 -  T ListGraph::first() const { 
    5.50 -    std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>();" << std::endl; 
    5.51 -    return T(); 
    5.52 -  }
    5.53 +//   template< typename T >
    5.54 +//   T ListGraph::first() const { 
    5.55 +//     std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>();" << std::endl; 
    5.56 +//     return T(); 
    5.57 +//   }
    5.58  
    5.59 -  template<>
    5.60 -  ListGraph::EachNodeIt ListGraph::first<ListGraph::EachNodeIt>() const { 
    5.61 -    return firstNode(); 
    5.62 -  }
    5.63 +//   template<>
    5.64 +//   ListGraph::EachNodeIt ListGraph::first<ListGraph::EachNodeIt>() const { 
    5.65 +//     return firstNode(); 
    5.66 +//   }
    5.67  
    5.68 -  template<>
    5.69 -  ListGraph::EachEdgeIt ListGraph::first<ListGraph::EachEdgeIt>() const { 
    5.70 -    return firstEdge(); 
    5.71 -  }
    5.72 +//   template<>
    5.73 +//   ListGraph::EachEdgeIt ListGraph::first<ListGraph::EachEdgeIt>() const { 
    5.74 +//     return firstEdge(); 
    5.75 +//   }
    5.76  
    5.77 -  template< typename T >
    5.78 -  T ListGraph::first(ListGraph::NodeIt v) const {
    5.79 -    std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>(ListGRaph::NodeIt);" << std::endl; 
    5.80 -    return T(); 
    5.81 -  } 
    5.82 +//   template< typename T >
    5.83 +//   T ListGraph::first(ListGraph::NodeIt v) const {
    5.84 +//     std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>(ListGRaph::NodeIt);" << std::endl; 
    5.85 +//     return T(); 
    5.86 +//   } 
    5.87  
    5.88 -  template<>
    5.89 -  ListGraph::OutEdgeIt ListGraph::first<ListGraph::OutEdgeIt>(const ListGraph::NodeIt v) const { 
    5.90 -    return firstOutEdge(v); 
    5.91 -  }
    5.92 +//   template<>
    5.93 +//   ListGraph::OutEdgeIt ListGraph::first<ListGraph::OutEdgeIt>(const ListGraph::NodeIt v) const { 
    5.94 +//     return firstOutEdge(v); 
    5.95 +//   }
    5.96  
    5.97 -  template<>
    5.98 -  ListGraph::InEdgeIt ListGraph::first<ListGraph::InEdgeIt>(const ListGraph::NodeIt v) const { 
    5.99 -    return firstInEdge(v); 
   5.100 -  }
   5.101 +//   template<>
   5.102 +//   ListGraph::InEdgeIt ListGraph::first<ListGraph::InEdgeIt>(const ListGraph::NodeIt v) const { 
   5.103 +//     return firstInEdge(v); 
   5.104 +//   }
   5.105  
   5.106 -  template<>
   5.107 -  ListGraph::SymEdgeIt ListGraph::first<ListGraph::SymEdgeIt>(const ListGraph::NodeIt v) const { 
   5.108 -    return firstSymEdge(v); 
   5.109 -  }
   5.110 -  */
   5.111 +//   template<>
   5.112 +//   ListGraph::SymEdgeIt ListGraph::first<ListGraph::SymEdgeIt>(const ListGraph::NodeIt v) const { 
   5.113 +//     return firstSymEdge(v); 
   5.114 +//   }
   5.115  
   5.116  
   5.117 -} //namespace marci
   5.118 +} //namespace hugo
   5.119  
   5.120  #endif //LIST_GRAPH_HH
     6.1 --- a/src/work/marci_bfs.hh	Fri Feb 20 21:57:39 2004 +0000
     6.2 +++ b/src/work/marci_bfs.hh	Fri Feb 20 21:59:34 2004 +0000
     6.3 @@ -5,7 +5,7 @@
     6.4  
     6.5  #include <marci_property_vector.hh>
     6.6  
     6.7 -namespace marci {
     6.8 +namespace hugo {
     6.9  
    6.10    template <typename graph_type>
    6.11    struct bfs {
    6.12 @@ -171,6 +171,6 @@
    6.13  
    6.14    };
    6.15  
    6.16 -} // namespace marci
    6.17 +} // namespace hugo
    6.18  
    6.19  #endif //MARCI_BFS_HH
     7.1 --- a/src/work/marci_graph_demo.cc	Fri Feb 20 21:57:39 2004 +0000
     7.2 +++ b/src/work/marci_graph_demo.cc	Fri Feb 20 21:59:34 2004 +0000
     7.3 @@ -6,7 +6,7 @@
     7.4  #include <bfs_iterator.hh>
     7.5  #include <edmonds_karp.hh>
     7.6  
     7.7 -using namespace marci;
     7.8 +using namespace hugo;
     7.9  
    7.10  int main (int, char*[])
    7.11  {
     8.1 --- a/src/work/marci_graph_traits.hh	Fri Feb 20 21:57:39 2004 +0000
     8.2 +++ b/src/work/marci_graph_traits.hh	Fri Feb 20 21:59:34 2004 +0000
     8.3 @@ -1,7 +1,7 @@
     8.4  #ifndef MARCI_GRAPH_TRAITS_HH
     8.5  #define MARCI_GRAPH_TRAITS_HH
     8.6  
     8.7 -namespace marci {
     8.8 +namespace hugo {
     8.9  
    8.10    template <typename graph_type>
    8.11    struct graph_traits {
    8.12 @@ -14,6 +14,6 @@
    8.13      typedef typename graph_type::sym_edge_iterator sym_edge_iterator;
    8.14    };
    8.15  
    8.16 -} // namespace marci
    8.17 +} // namespace hugo
    8.18  
    8.19  #endif //MARCI_GRAPH_TRAITS_HH
     9.1 --- a/src/work/marci_list_graph.hh	Fri Feb 20 21:57:39 2004 +0000
     9.2 +++ b/src/work/marci_list_graph.hh	Fri Feb 20 21:59:34 2004 +0000
     9.3 @@ -3,7 +3,7 @@
     9.4  
     9.5  #include <iostream>
     9.6  
     9.7 -namespace marci {
     9.8 +namespace hugo {
     9.9  
    9.10    class list_graph {
    9.11      class node_item;
    9.12 @@ -338,6 +338,6 @@
    9.13  
    9.14  
    9.15  
    9.16 -} //namespace marci
    9.17 +} //namespace hugo
    9.18  
    9.19  #endif //MARCI_LIST_GRAPH_HH
    10.1 --- a/src/work/marci_max_flow.hh	Fri Feb 20 21:57:39 2004 +0000
    10.2 +++ b/src/work/marci_max_flow.hh	Fri Feb 20 21:59:34 2004 +0000
    10.3 @@ -6,7 +6,7 @@
    10.4  #include <marci_property_vector.hh>
    10.5  #include <marci_bfs.hh>
    10.6  
    10.7 -namespace marci {
    10.8 +namespace hugo {
    10.9  
   10.10    template<typename graph_type, typename T>
   10.11    class res_graph_type { 
   10.12 @@ -178,6 +178,6 @@
   10.13      }
   10.14    };
   10.15  
   10.16 -} // namespace marci
   10.17 +} // namespace hugo
   10.18  
   10.19  #endif //MARCI_MAX_FLOW_HH
    11.1 --- a/src/work/marci_property_vector.hh	Fri Feb 20 21:57:39 2004 +0000
    11.2 +++ b/src/work/marci_property_vector.hh	Fri Feb 20 21:59:34 2004 +0000
    11.3 @@ -3,7 +3,7 @@
    11.4  
    11.5  #include <vector>
    11.6  
    11.7 -namespace marci {
    11.8 +namespace hugo {
    11.9  
   11.10    template <typename iterator>
   11.11    int number_of(iterator _it) { 
   11.12 @@ -14,8 +14,8 @@
   11.13    
   11.14    template <typename graph_type, typename T>
   11.15    class node_property_vector {
   11.16 -    typedef typename list_graph::node_iterator node_iterator;
   11.17 -    typedef typename list_graph::each_node_iterator each_node_iterator;
   11.18 +    typedef typename graph_type::node_iterator node_iterator;
   11.19 +    typedef typename graph_type::each_node_iterator each_node_iterator;
   11.20      graph_type& G; 
   11.21      std::vector<T> container;
   11.22    public:
   11.23 @@ -52,6 +52,6 @@
   11.24      T get(edge_iterator eit) { return container[G.id(eit)]; }
   11.25    };
   11.26  
   11.27 -} // namespace marci
   11.28 +} // namespace hugo
   11.29  
   11.30  #endif //MARCI_PROPERTY_VECTOR_HH