# HG changeset patch # User alpar # Date 1077314374 0 # Node ID 8d62f0072ff0da48244fbe322c977d27ad6c58eb # Parent 0508d63fcc96e2d6c3639a7ed0ae03b81eeb1042 marci -> hugo resize -> update diff -r 0508d63fcc96 -r 8d62f0072ff0 src/work/edmonds_karp.hh --- a/src/work/edmonds_karp.hh Fri Feb 20 21:57:39 2004 +0000 +++ b/src/work/edmonds_karp.hh Fri Feb 20 21:59:34 2004 +0000 @@ -8,7 +8,7 @@ #include #include -namespace marci { +namespace hugo { template 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 diff -r 0508d63fcc96 -r 8d62f0072ff0 src/work/flow_test.cc --- a/src/work/flow_test.cc Fri Feb 20 21:57:39 2004 +0000 +++ b/src/work/flow_test.cc Fri Feb 20 21:59:34 2004 +0000 @@ -10,7 +10,7 @@ #include #include -using namespace marci; +using namespace hugo; int main (int, char*[]) diff -r 0508d63fcc96 -r 8d62f0072ff0 src/work/iterator_bfs_demo.cc --- a/src/work/iterator_bfs_demo.cc Fri Feb 20 21:57:39 2004 +0000 +++ b/src/work/iterator_bfs_demo.cc Fri Feb 20 21:59:34 2004 +0000 @@ -6,7 +6,7 @@ #include #include -using namespace marci; +using namespace hugo; int main (int, char*[]) { diff -r 0508d63fcc96 -r 8d62f0072ff0 src/work/iterator_bfs_dfs_demo.cc --- a/src/work/iterator_bfs_dfs_demo.cc Fri Feb 20 21:57:39 2004 +0000 +++ b/src/work/iterator_bfs_dfs_demo.cc Fri Feb 20 21:59:34 2004 +0000 @@ -5,7 +5,7 @@ #include #include -using namespace marci; +using namespace hugo; int main (int, char*[]) { diff -r 0508d63fcc96 -r 8d62f0072ff0 src/work/list_graph.hh --- a/src/work/list_graph.hh Fri Feb 20 21:57:39 2004 +0000 +++ b/src/work/list_graph.hh Fri Feb 20 21:59:34 2004 +0000 @@ -4,7 +4,7 @@ #include #include -namespace marci { +namespace hugo { template 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 @@ -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 It next(It it) const { - It tmp(it); return goNext(it); } + It tmp(it); return goNext(tmp); } template It& goNext(It& it) const { return ++it; } @@ -508,46 +508,44 @@ }; - /* - template< typename T > - T ListGraph::first() const { - std::cerr << "Invalid use of template T ListGraph::first();" << std::endl; - return T(); - } +// template< typename T > +// T ListGraph::first() const { +// std::cerr << "Invalid use of template T ListGraph::first();" << std::endl; +// return T(); +// } - template<> - ListGraph::EachNodeIt ListGraph::first() const { - return firstNode(); - } +// template<> +// ListGraph::EachNodeIt ListGraph::first() const { +// return firstNode(); +// } - template<> - ListGraph::EachEdgeIt ListGraph::first() const { - return firstEdge(); - } +// template<> +// ListGraph::EachEdgeIt ListGraph::first() const { +// return firstEdge(); +// } - template< typename T > - T ListGraph::first(ListGraph::NodeIt v) const { - std::cerr << "Invalid use of template T ListGraph::first(ListGRaph::NodeIt);" << std::endl; - return T(); - } +// template< typename T > +// T ListGraph::first(ListGraph::NodeIt v) const { +// std::cerr << "Invalid use of template T ListGraph::first(ListGRaph::NodeIt);" << std::endl; +// return T(); +// } - template<> - ListGraph::OutEdgeIt ListGraph::first(const ListGraph::NodeIt v) const { - return firstOutEdge(v); - } +// template<> +// ListGraph::OutEdgeIt ListGraph::first(const ListGraph::NodeIt v) const { +// return firstOutEdge(v); +// } - template<> - ListGraph::InEdgeIt ListGraph::first(const ListGraph::NodeIt v) const { - return firstInEdge(v); - } +// template<> +// ListGraph::InEdgeIt ListGraph::first(const ListGraph::NodeIt v) const { +// return firstInEdge(v); +// } - template<> - ListGraph::SymEdgeIt ListGraph::first(const ListGraph::NodeIt v) const { - return firstSymEdge(v); - } - */ +// template<> +// ListGraph::SymEdgeIt ListGraph::first(const ListGraph::NodeIt v) const { +// return firstSymEdge(v); +// } -} //namespace marci +} //namespace hugo #endif //LIST_GRAPH_HH diff -r 0508d63fcc96 -r 8d62f0072ff0 src/work/marci_bfs.hh --- a/src/work/marci_bfs.hh Fri Feb 20 21:57:39 2004 +0000 +++ b/src/work/marci_bfs.hh Fri Feb 20 21:59:34 2004 +0000 @@ -5,7 +5,7 @@ #include -namespace marci { +namespace hugo { template struct bfs { @@ -171,6 +171,6 @@ }; -} // namespace marci +} // namespace hugo #endif //MARCI_BFS_HH diff -r 0508d63fcc96 -r 8d62f0072ff0 src/work/marci_graph_demo.cc --- a/src/work/marci_graph_demo.cc Fri Feb 20 21:57:39 2004 +0000 +++ b/src/work/marci_graph_demo.cc Fri Feb 20 21:59:34 2004 +0000 @@ -6,7 +6,7 @@ #include #include -using namespace marci; +using namespace hugo; int main (int, char*[]) { diff -r 0508d63fcc96 -r 8d62f0072ff0 src/work/marci_graph_traits.hh --- a/src/work/marci_graph_traits.hh Fri Feb 20 21:57:39 2004 +0000 +++ b/src/work/marci_graph_traits.hh Fri Feb 20 21:59:34 2004 +0000 @@ -1,7 +1,7 @@ #ifndef MARCI_GRAPH_TRAITS_HH #define MARCI_GRAPH_TRAITS_HH -namespace marci { +namespace hugo { template 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 diff -r 0508d63fcc96 -r 8d62f0072ff0 src/work/marci_list_graph.hh --- a/src/work/marci_list_graph.hh Fri Feb 20 21:57:39 2004 +0000 +++ b/src/work/marci_list_graph.hh Fri Feb 20 21:59:34 2004 +0000 @@ -3,7 +3,7 @@ #include -namespace marci { +namespace hugo { class list_graph { class node_item; @@ -338,6 +338,6 @@ -} //namespace marci +} //namespace hugo #endif //MARCI_LIST_GRAPH_HH diff -r 0508d63fcc96 -r 8d62f0072ff0 src/work/marci_max_flow.hh --- a/src/work/marci_max_flow.hh Fri Feb 20 21:57:39 2004 +0000 +++ b/src/work/marci_max_flow.hh Fri Feb 20 21:59:34 2004 +0000 @@ -6,7 +6,7 @@ #include #include -namespace marci { +namespace hugo { template class res_graph_type { @@ -178,6 +178,6 @@ } }; -} // namespace marci +} // namespace hugo #endif //MARCI_MAX_FLOW_HH diff -r 0508d63fcc96 -r 8d62f0072ff0 src/work/marci_property_vector.hh --- a/src/work/marci_property_vector.hh Fri Feb 20 21:57:39 2004 +0000 +++ b/src/work/marci_property_vector.hh Fri Feb 20 21:59:34 2004 +0000 @@ -3,7 +3,7 @@ #include -namespace marci { +namespace hugo { template int number_of(iterator _it) { @@ -14,8 +14,8 @@ template 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 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