Changeset 377:33fe0ee01dc5 in lemon-0.x for src/work/deba/test_graph.h
- Timestamp:
- 04/22/04 18:36:57 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@507
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/deba/test_graph.h
r340 r377 6 6 #include <vector> 7 7 8 #include <invalid.h> 9 10 #include "vector_map.h" 8 #include "invalid.h" 9 11 10 #include "edge_map_registry.h" 12 11 #include "node_map_registry.h" 13 12 #include "edge_map_base.h" 14 13 #include "node_map_base.h" 14 #include "vector_map.h" 15 15 16 16 namespace hugo { … … 41 41 // template <typename T> friend class EdgeMap; 42 42 43 NodeMapRegistry<ListGraph, Node> node_maps; 43 private: 44 45 NodeMapRegistry<ListGraph, Node> node_maps(*this); 46 EdgeMapRegistry<ListGraph, Edge> edge_maps(*this); 47 48 public: 49 44 50 45 51 template <typename T> 46 class NodeMap : public VectorMap<ListGraph, Edge, T, EdgeMapBase> {}; 52 class NodeMap : public VectorMap<ListGraph, Node, T, NodeMapBase> { 53 public: 54 NodeMap(ListGraph& g) : VectorMap<ListGraph, Node, T, NodeMapBase>(g) {} 55 }; 47 56 48 57 EdgeMapRegistry<ListGraph, Edge> edge_maps; 49 58 50 59 template <typename T> 51 class EdgeMap : public VectorMap< Graph, Node, T, NodeMapBase> {};60 class EdgeMap : public VectorMap<ListGraph, Edge, T, EdgeMapBase> {}; 52 61 53 62 … … 311 320 312 321 void erase(Node i) { 313 node_map .erase(i);322 node_maps.erase(i); 314 323 while (first<OutEdgeIt>(i).valid()) erase(first<OutEdgeIt>(i)); 315 324 while (first<InEdgeIt>(i).valid()) erase(first<InEdgeIt>(i));
Note: See TracChangeset
for help on using the changeset viewer.