Changeset 107:8d62f0072ff0 in lemon-0.x
- Timestamp:
- 02/20/04 22:59:34 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@142
- Location:
- src/work
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/edmonds_karp.hh
r100 r107 9 9 #include <time_measure.h> 10 10 11 namespace marci{11 namespace hugo { 12 12 13 13 template<typename Graph, typename Number, typename FlowMap, typename CapacityMap> … … 541 541 void set(NodeIt nit, T a) { container[G.id(nit)]=a; } 542 542 T get(NodeIt nit) const { return container[G.id(nit)]; } 543 //void resize() { container.resize(G.node_id); }544 //void resize(T a) { container.resize(G.node_id, a); }543 //void update() { container.resize(G.node_id); } 544 //void update(T a) { container.resize(G.node_id, a); } 545 545 }; 546 546 */ … … 647 647 648 648 649 } // namespace marci649 } // namespace hugo 650 650 651 651 #endif //EDMONDS_KARP_HH -
src/work/flow_test.cc
r33 r107 11 11 #include <dijkstra.hh> 12 12 13 using namespace marci;13 using namespace hugo; 14 14 15 15 -
src/work/iterator_bfs_demo.cc
r99 r107 7 7 #include <graph_wrapper.h> 8 8 9 using namespace marci;9 using namespace hugo; 10 10 11 11 int main (int, char*[]) -
src/work/iterator_bfs_dfs_demo.cc
r59 r107 6 6 #include <bfs_iterator.hh> 7 7 8 using namespace marci;8 using namespace hugo; 9 9 10 10 int main (int, char*[]) -
src/work/list_graph.hh
r94 r107 5 5 #include <vector> 6 6 7 namespace marci{7 namespace hugo { 8 8 9 9 template <typename It> … … 50 50 T& operator[](NodeIt n) { return container[/*G.id(n)*/n.node->id]; } 51 51 const T& operator[](NodeIt n) const { return container[/*G.id(n)*/n.node->id]; } 52 void resize() { container.resize(G.node_id); }53 void resize(T a) { container.resize(G.node_id, a); }52 void update() { container.resize(G.node_id); } 53 void update(T a) { container.resize(G.node_id, a); } 54 54 }; 55 55 … … 68 68 T& operator[](EdgeIt e) { return container[/*G.id(e)*/e.edge->id]; } 69 69 const T& operator[](EdgeIt e) const { return container[/*G.id(e)*/e.edge->id]; } 70 void resize() { container.resize(G.edge_id); }71 void resize(T a) { container.resize(G.edge_id, a); }70 void update() { container.resize(G.edge_id); } 71 void update(T a) { container.resize(G.edge_id, a); } 72 72 }; 73 73 … … 307 307 308 308 template <typename It> It next(It it) const { 309 It tmp(it); return goNext( it); }309 It tmp(it); return goNext(tmp); } 310 310 template <typename It> It& goNext(It& it) const { return ++it; } 311 311 … … 509 509 }; 510 510 511 /* 512 template< typename T > 513 T ListGraph::first() const { 514 std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>();" << std::endl; 515 return T(); 516 } 517 518 template<> 519 ListGraph::EachNodeIt ListGraph::first<ListGraph::EachNodeIt>() const { 520 return firstNode(); 521 } 522 523 template<> 524 ListGraph::EachEdgeIt ListGraph::first<ListGraph::EachEdgeIt>() const { 525 return firstEdge(); 526 } 527 528 template< typename T > 529 T ListGraph::first(ListGraph::NodeIt v) const { 530 std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>(ListGRaph::NodeIt);" << std::endl; 531 return T(); 532 } 533 534 template<> 535 ListGraph::OutEdgeIt ListGraph::first<ListGraph::OutEdgeIt>(const ListGraph::NodeIt v) const { 536 return firstOutEdge(v); 537 } 538 539 template<> 540 ListGraph::InEdgeIt ListGraph::first<ListGraph::InEdgeIt>(const ListGraph::NodeIt v) const { 541 return firstInEdge(v); 542 } 543 544 template<> 545 ListGraph::SymEdgeIt ListGraph::first<ListGraph::SymEdgeIt>(const ListGraph::NodeIt v) const { 546 return firstSymEdge(v); 547 } 548 */ 549 550 551 } //namespace marci 511 // template< typename T > 512 // T ListGraph::first() const { 513 // std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>();" << std::endl; 514 // return T(); 515 // } 516 517 // template<> 518 // ListGraph::EachNodeIt ListGraph::first<ListGraph::EachNodeIt>() const { 519 // return firstNode(); 520 // } 521 522 // template<> 523 // ListGraph::EachEdgeIt ListGraph::first<ListGraph::EachEdgeIt>() const { 524 // return firstEdge(); 525 // } 526 527 // template< typename T > 528 // T ListGraph::first(ListGraph::NodeIt v) const { 529 // std::cerr << "Invalid use of template<typemane T> T ListGraph::first<T>(ListGRaph::NodeIt);" << std::endl; 530 // return T(); 531 // } 532 533 // template<> 534 // ListGraph::OutEdgeIt ListGraph::first<ListGraph::OutEdgeIt>(const ListGraph::NodeIt v) const { 535 // return firstOutEdge(v); 536 // } 537 538 // template<> 539 // ListGraph::InEdgeIt ListGraph::first<ListGraph::InEdgeIt>(const ListGraph::NodeIt v) const { 540 // return firstInEdge(v); 541 // } 542 543 // template<> 544 // ListGraph::SymEdgeIt ListGraph::first<ListGraph::SymEdgeIt>(const ListGraph::NodeIt v) const { 545 // return firstSymEdge(v); 546 // } 547 548 549 } //namespace hugo 552 550 553 551 #endif //LIST_GRAPH_HH -
src/work/marci_bfs.hh
r19 r107 6 6 #include <marci_property_vector.hh> 7 7 8 namespace marci{8 namespace hugo { 9 9 10 10 template <typename graph_type> … … 172 172 }; 173 173 174 } // namespace marci174 } // namespace hugo 175 175 176 176 #endif //MARCI_BFS_HH -
src/work/marci_graph_demo.cc
r75 r107 7 7 #include <edmonds_karp.hh> 8 8 9 using namespace marci;9 using namespace hugo; 10 10 11 11 int main (int, char*[]) -
src/work/marci_graph_traits.hh
r9 r107 2 2 #define MARCI_GRAPH_TRAITS_HH 3 3 4 namespace marci{4 namespace hugo { 5 5 6 6 template <typename graph_type> … … 15 15 }; 16 16 17 } // namespace marci17 } // namespace hugo 18 18 19 19 #endif //MARCI_GRAPH_TRAITS_HH -
src/work/marci_list_graph.hh
r19 r107 4 4 #include <iostream> 5 5 6 namespace marci{6 namespace hugo { 7 7 8 8 class list_graph { … … 339 339 340 340 341 } //namespace marci341 } //namespace hugo 342 342 343 343 #endif //MARCI_LIST_GRAPH_HH -
src/work/marci_max_flow.hh
r19 r107 7 7 #include <marci_bfs.hh> 8 8 9 namespace marci{9 namespace hugo { 10 10 11 11 template<typename graph_type, typename T> … … 179 179 }; 180 180 181 } // namespace marci181 } // namespace hugo 182 182 183 183 #endif //MARCI_MAX_FLOW_HH -
src/work/marci_property_vector.hh
r19 r107 4 4 #include <vector> 5 5 6 namespace marci{6 namespace hugo { 7 7 8 8 template <typename iterator> … … 15 15 template <typename graph_type, typename T> 16 16 class node_property_vector { 17 typedef typename list_graph::node_iterator node_iterator;18 typedef typename list_graph::each_node_iterator each_node_iterator;17 typedef typename graph_type::node_iterator node_iterator; 18 typedef typename graph_type::each_node_iterator each_node_iterator; 19 19 graph_type& G; 20 20 std::vector<T> container; … … 53 53 }; 54 54 55 } // namespace marci55 } // namespace hugo 56 56 57 57 #endif //MARCI_PROPERTY_VECTOR_HH
Note: See TracChangeset
for help on using the changeset viewer.