Changeset 880:9d0bfd35b97c in lemon-0.x
- Timestamp:
- 09/17/04 17:51:50 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1188
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
doc/graphs.dox
r875 r880 10 10 11 11 Each graph should meet the 12 \ref hugo::skeleton::StaticGraph Skeleton"StaticGraph" concept.12 \ref hugo::skeleton::StaticGraph "StaticGraph" concept. 13 13 This concept does not 14 14 makes it possible to change the graph (i.e. it is not possible to add … … 17 17 18 18 The graphs meeting the 19 \ref hugo::skeleton::ExtendableGraph Skeleton"ExtendableGraph"19 \ref hugo::skeleton::ExtendableGraph "ExtendableGraph" 20 20 concept allow node and 21 21 edge addition. You can also "clear" (i.e. erase all edges and nodes) … … 23 23 24 24 In case of graphs meeting the full feature 25 \ref hugo::skeleton::ErasableGraph Skeleton"ErasableGraph"25 \ref hugo::skeleton::ErasableGraph "ErasableGraph" 26 26 concept 27 27 you can also erase individual edges and node in arbitrary order. … … 29 29 The implemented graph structures are the following. 30 30 \li \ref hugo::ListGraph "ListGraph" is the most versatile graph class. It meets 31 the hugo::skeleton::ErasableGraph Skeleton"ErasableGraph" concept31 the hugo::skeleton::ErasableGraph "ErasableGraph" concept 32 32 and it also have some convenience features. 33 33 \li \ref hugo::SmartGraph "SmartGraph" is a more memory 34 34 efficient version of \ref hugo::ListGraph "ListGraph". The 35 35 price of it is that it only meets the 36 \ref hugo::skeleton::ExtendableGraph Skeleton"ExtendableGraph" concept,36 \ref hugo::skeleton::ExtendableGraph "ExtendableGraph" concept, 37 37 so you cannot delete individual edges or nodes. 38 38 \li \ref hugo::SymListGraph "SymListGraph" and -
src/hugo/dijkstra.h
r802 r880 19 19 ///This class provides an efficient implementation of %Dijkstra algorithm. 20 20 ///The edge lengths are passed to the algorithm using a 21 ///\ref ReadMapSkeleton "readable map",21 ///\ref skeleton::ReadMap "ReadMap", 22 22 ///so it is easy to change it to any kind of length. 23 23 /// 24 ///The type of the length is determined by the \c ValueType of the length map. 24 ///The type of the length is determined by the 25 ///\ref skeleton::ReadMap::ValueType "ValueType" of the length map. 25 26 /// 26 27 ///It is also possible to change the underlying priority heap. … … 33 34 ///may involve in relatively time consuming process to compute the edge 34 35 ///length if it is necessary. The default map type is 35 ///\ref GraphSkeleton::EdgeMap "Graph::EdgeMap<int>"36 ///\ref skeleton::StaticGraph::EdgeMap "Graph::EdgeMap<int>" 36 37 ///\param Heap The heap type used by the %Dijkstra 37 38 ///algorithm. The default -
src/hugo/full_graph.h
r822 r880 28 28 ///It is completely static, so you can neither add nor delete either 29 29 ///edges or nodes. 30 /// Otherwise it conforms to the graph interface documented under31 ///the description of \ref GraphSkeleton.32 ///\sa \ref GraphSkeleton.30 ///Thus it conforms to 31 ///the \ref skeleton::StaticGraph "StaticGraph" concept 32 ///\sa skeleton::StaticGraph. 33 33 ///\todo What about loops? 34 34 ///\todo Don't we need SymEdgeMap? -
src/hugo/list_graph.h
r877 r880 30 30 ///This is a simple and fast erasable graph implementation. 31 31 /// 32 ///It conforms to the graph interface documented under 33 ///the description of 34 ///\ref skeleton::ErasableGraphSkeleton "ErasableGraphSkeleton". 35 ///\sa skeleton::ErasableGraphSkeleton. 32 ///It conforms to the 33 ///\ref skeleton::ErasableGraph "ErasableGraph" concept. 34 ///\sa skeleton::ErasableGraph. 36 35 class ListGraph { 37 36 … … 313 312 NodeIt(Invalid i) : Node(i) { } 314 313 NodeIt(const ListGraph& _G) : Node(_G.first_node), G(&_G) { } 315 ///\todo Undocumented conversion Node -\> NodeIt.316 314 NodeIt(const ListGraph& _G,Node n) : Node(n), G(&_G) { } 317 315 NodeIt &operator++() { … … 427 425 ///feature by 428 426 ///storing shared values for the edge pairs. The usual 429 ///\ref Graph Skeleton::EdgeMap "EdgeMap"427 ///\ref Graph::EdgeMap "EdgeMap" 430 428 ///can be used 431 429 ///as well. … … 495 493 ///\ref EdgeSet class. 496 494 /// 497 ///It conforms to the graph interface documented under 498 ///the description of \ref GraphSkeleton with the exception that you cannot 495 ///It conforms to 496 ///the \ref skeleton::ExtendableGraph "ExtendableGraph" concept 497 ///with the exception that you cannot 499 498 ///add (or delete) edges. The usual edge iterators are exists, but they are 500 499 ///always \ref INVALID. 501 ///\sa \ref GraphSkeleton502 ///\sa \refEdgeSet500 ///\sa skeleton::ExtendableGraph 501 ///\sa EdgeSet 503 502 class NodeSet { 504 503 … … 791 790 /// 792 791 ///\param GG The type of the graph which shares its node set with this class. 793 ///Its interface must conform with \ref GraphSkeleton. 792 ///Its interface must conform to the 793 ///\ref skeleton::StaticGraph "StaticGraph" concept. 794 794 /// 795 ///It conforms to the graph interface documented under796 /// the description of \ref GraphSkeleton.797 ///\sa \ref GraphSkeleton.798 ///\sa \refNodeSet.795 ///It conforms to the 796 ///\ref skeleton::ExtendableGraph "ExtendableGraph" concept. 797 ///\sa skeleton::ExtendableGraph. 798 ///\sa NodeSet. 799 799 template<typename GG> 800 800 class EdgeSet { … … 898 898 ///Construates a new graph based on the nodeset of an existing one. 899 899 ///\param _G the base graph. 900 ///\todo It looks like a copy constructor, but it isn't. 901 EdgeSet(NodeGraphType &_G) 900 explicit EdgeSet(NodeGraphType &_G) 902 901 : G(_G), nodes(_G), edges(), 903 902 first_free_edge(-1) {} … … 906 905 ///Makes a copy of an EdgeSet. 907 906 ///It will be based on the same graph. 908 EdgeSet(const EdgeSet &_g)907 explicit EdgeSet(const EdgeSet &_g) 909 908 : G(_g.G), nodes(_g.G), edges(_g.edges), 910 909 first_free_edge(_g.first_free_edge) {} -
src/hugo/skeletons/graph.h
r873 r880 5 5 ///\ingroup skeletons 6 6 ///\file 7 ///\brief Declaration of Graph Skeleton.7 ///\brief Declaration of Graph. 8 8 9 9 #include <hugo/invalid.h> … … 32 32 /// like @ref ListGraph or 33 33 /// @ref SmartGraph will just refer to this structure. 34 class StaticGraph Skeleton34 class StaticGraph 35 35 { 36 36 public: … … 39 39 /// Defalult constructor. 40 40 /// 41 StaticGraph Skeleton() { }41 StaticGraph() { } 42 42 ///Copy consructor. 43 43 44 44 // ///\todo It is not clear, what we expect from a copy constructor. 45 45 // ///E.g. How to assign the nodes/edges to each other? What about maps? 46 // StaticGraph Skeleton(const StaticGraphSkeleton& g) { }46 // StaticGraph(const StaticGraph& g) { } 47 47 48 48 /// The base type of node iterators, … … 123 123 /// Sets the iterator to the first node of \c g. 124 124 /// 125 NodeIt(const StaticGraph Skeleton& g) { }125 NodeIt(const StaticGraph& g) { } 126 126 /// Node -> NodeIt conversion. 127 127 … … 130 130 /// This feature necessitates that each time we 131 131 /// iterate the edge-set, the iteration order is the same. 132 NodeIt(const StaticGraph Skeleton& g, const Node& n) { }132 NodeIt(const StaticGraph& g, const Node& n) { } 133 133 /// Next node. 134 134 … … 215 215 ///@param n the node 216 216 ///@param g the graph 217 OutEdgeIt(const StaticGraph Skeleton& g, const Node& n) { }217 OutEdgeIt(const StaticGraph& g, const Node& n) { } 218 218 /// Edge -> OutEdgeIt conversion 219 219 … … 221 221 /// This feature necessitates that each time we 222 222 /// iterate the edge-set, the iteration order is the same. 223 OutEdgeIt(const StaticGraph Skeleton& g, const Edge& e) { }223 OutEdgeIt(const StaticGraph& g, const Edge& e) { } 224 224 ///Next outgoing edge 225 225 … … 264 264 ///@param n the node 265 265 ///@param g the graph 266 InEdgeIt(const StaticGraph Skeleton& g, const Node& n) { }266 InEdgeIt(const StaticGraph& g, const Node& n) { } 267 267 /// Edge -> InEdgeIt conversion 268 268 … … 270 270 /// This feature necessitates that each time we 271 271 /// iterate the edge-set, the iteration order is the same. 272 InEdgeIt(const StaticGraph Skeleton& g, const Edge& n) { }272 InEdgeIt(const StaticGraph& g, const Edge& n) { } 273 273 /// Next incoming edge 274 274 … … 308 308 /// node 309 309 ///@param g the graph 310 EdgeIt(const StaticGraph Skeleton& g) { }310 EdgeIt(const StaticGraph& g) { } 311 311 /// Edge -> EdgeIt conversion 312 312 … … 314 314 /// This feature necessitates that each time we 315 315 /// iterate the edge-set, the iteration order is the same. 316 EdgeIt(const StaticGraph Skeleton&, const Edge&) { }316 EdgeIt(const StaticGraph&, const Edge&) { } 317 317 ///Next edge 318 318 … … 371 371 /// . 372 372 373 ///\todo What is this?373 ///\todo Should it be in the concept? 374 374 /// 375 375 int nodeNum() const { return 0; } 376 376 /// . 377 ///\todo What is this? 377 378 ///\todo Should it be in the concept? 378 379 /// 379 380 int edgeNum() const { return 0; } … … 382 383 ///Reference map of the nodes to type \c T. 383 384 385 /// \ingroup skeletons 384 386 ///Reference map of the nodes to type \c T. 385 /// \sa Reference Skeleton387 /// \sa Reference 386 388 /// \warning Making maps that can handle bool type (NodeMap<bool>) 387 389 /// needs some extra attention! 388 template<class T> class NodeMap : public ReferenceMap< Node, T >390 template<class T> class NodeMap : public ReferenceMap< Node, T > 389 391 { 390 392 public: 391 393 392 394 /// . 393 NodeMap(const StaticGraph Skeleton&) { }395 NodeMap(const StaticGraph&) { } 394 396 /// . 395 NodeMap(const StaticGraph Skeleton&, T) { }397 NodeMap(const StaticGraph&, T) { } 396 398 397 399 ///Copy constructor … … 404 406 ///Reference map of the edges to type \c T. 405 407 408 /// \ingroup skeletons 406 409 ///Reference map of the edges to type \c T. 407 /// \sa Reference Skeleton410 /// \sa Reference 408 411 /// \warning Making maps that can handle bool type (EdgeMap<bool>) 409 412 /// needs some extra attention! … … 414 417 415 418 /// . 416 EdgeMap(const StaticGraph Skeleton&) { }419 EdgeMap(const StaticGraph&) { } 417 420 /// . 418 EdgeMap(const StaticGraph Skeleton&, T) { }421 EdgeMap(const StaticGraph&, T) { } 419 422 420 423 ///Copy constructor … … 430 433 /// An empty non-static graph class. 431 434 432 /// This class provides everything that \ c StaticGraphSkeleton435 /// This class provides everything that \ref StaticGraph 433 436 /// with additional functionality which enables to build a 434 437 /// graph from scratch. 435 class ExtendableGraph Skeleton : public StaticGraphSkeleton438 class ExtendableGraph : public StaticGraph 436 439 { 437 440 public: … … 440 443 /// Defalult constructor. 441 444 /// 442 ExtendableGraph Skeleton() { }445 ExtendableGraph() { } 443 446 ///Add a new node to the graph. 444 447 … … 448 451 ///Add a new edge to the graph. 449 452 450 ///Add a new edge to the graph with tail node \c t ail451 ///and head node \c h ead.453 ///Add a new edge to the graph with tail node \c t 454 ///and head node \c h. 452 455 ///\return the new edge. 453 Edge addEdge(Node , Node) { return INVALID; }456 Edge addEdge(Node h, Node t) { return INVALID; } 454 457 455 458 /// Resets the graph. … … 457 460 /// This function deletes all edges and nodes of the graph. 458 461 /// It also frees the memory allocated to store them. 459 /// \todo It might belong to \ c ErasableGraphSkeleton.462 /// \todo It might belong to \ref ErasableGraph. 460 463 void clear() { } 461 464 }; … … 463 466 /// An empty erasable graph class. 464 467 465 /// This class is an extension of \ c GraphSkeleton. It also makes it468 /// This class is an extension of \ref ExtendableGraph. It also makes it 466 469 /// possible to erase edges or nodes. 467 class ErasableGraph Skeleton : public ExtendableGraphSkeleton470 class ErasableGraph : public ExtendableGraph 468 471 { 469 472 public: … … 472 475 /// Defalult constructor. 473 476 /// 474 ErasableGraph Skeleton() { }477 ErasableGraph() { } 475 478 /// Deletes a node. 476 479 -
src/hugo/smart_graph.h
r822 r880 31 31 ///It is also quite memory efficient, but at the price 32 32 ///that <b> it does not support node and edge deletion</b>. 33 ///It conforms to the graph interface documented under34 ///the description of \ref GraphSkeleton.35 ///\sa \ref GraphSkeleton.33 ///It conforms to 34 ///the \ref skeleton::ExtendableGraph "ExtendableGraph" concept. 35 ///\sa skeleton::ExtendableGraph. 36 36 /// 37 37 ///\todo Some member functions could be \c static. … … 303 303 ///feature by 304 304 ///storing shared values for the edge pairs. The usual 305 ///\ref Graph Skeleton::EdgeMap "EdgeMap"305 ///\ref Graph::EdgeMap "EdgeMap" 306 306 ///can be used 307 307 ///as well. … … 311 311 ///\warning It shares the similarity with \ref SmartGraph that 312 312 ///it is not possible to delete edges or nodes from the graph. 313 //\sa \refSmartGraph.313 //\sa SmartGraph. 314 314 315 315 class SymSmartGraph : public SmartGraph -
src/test/bfs_test.cc
r793 r880 11 11 void check_Bfs_Compile() 12 12 { 13 typedef skeleton::StaticGraph SkeletonGraph;13 typedef skeleton::StaticGraph Graph; 14 14 15 15 typedef Graph::Edge Edge; -
src/test/dfs_test.cc
r793 r880 11 11 void check_Dfs_SmartGraph_Compile() 12 12 { 13 typedef skeleton::StaticGraph SkeletonGraph;13 typedef skeleton::StaticGraph Graph; 14 14 15 15 typedef Graph::Edge Edge; -
src/test/dijkstra_test.cc
r793 r880 12 12 { 13 13 typedef int VType; 14 typedef skeleton::StaticGraph SkeletonGraph;14 typedef skeleton::StaticGraph Graph; 15 15 16 16 typedef Graph::Edge Edge; -
src/test/graph_test.cc
r873 r880 52 52 } 53 53 54 //Compile Graph Skeleton55 template void hugo::checkCompileStaticGraph<skeleton::StaticGraph Skeleton>56 (skeleton::StaticGraph Skeleton&);54 //Compile Graph 55 template void hugo::checkCompileStaticGraph<skeleton::StaticGraph> 56 (skeleton::StaticGraph &); 57 57 58 template void hugo::checkCompileGraph<skeleton::ExtendableGraph Skeleton>59 (skeleton::ExtendableGraph Skeleton&);58 template void hugo::checkCompileGraph<skeleton::ExtendableGraph> 59 (skeleton::ExtendableGraph &); 60 60 61 template void hugo::checkCompileErasableGraph<skeleton::ErasableGraph Skeleton>62 (skeleton::ErasableGraph Skeleton&);61 template void hugo::checkCompileErasableGraph<skeleton::ErasableGraph> 62 (skeleton::ErasableGraph &); 63 63 64 64 //Compile SmartGraph -
src/test/kruskal_test.cc
r810 r880 15 15 void checkCompileKruskal() 16 16 { 17 skeleton::WriteMap<skeleton::StaticGraph Skeleton::Edge,bool> w;17 skeleton::WriteMap<skeleton::StaticGraph::Edge,bool> w; 18 18 19 kruskalEdgeMap(skeleton::StaticGraph Skeleton(),20 skeleton::ReadMap<skeleton::StaticGraph Skeleton::Edge,int>(),19 kruskalEdgeMap(skeleton::StaticGraph(), 20 skeleton::ReadMap<skeleton::StaticGraph::Edge,int>(), 21 21 w); 22 22 } -
src/test/preflow_test.cc
r859 r880 14 14 { 15 15 typedef int VType; 16 typedef skeleton::StaticGraph SkeletonGraph;16 typedef skeleton::StaticGraph Graph; 17 17 18 18 typedef Graph::Node Node; -
src/work/alpar/list_graph_demo.cc
r426 r880 8 8 9 9 typedef ListGraph Graph; 10 //typedef Graph SkeletonGraph;10 //typedef Graph Graph; 11 11 12 12 -
src/work/alpar/smart_graph_demo.cc
r185 r880 8 8 9 9 typedef SmartGraph Graph; 10 //typedef Graph SkeletonGraph;10 //typedef Graph Graph; 11 11 12 12 -
src/work/deba/dijkstra.h
r698 r880 19 19 ///This class provides an efficient implementation of %Dijkstra algorithm. 20 20 ///The edge lengths are passed to the algorithm using a 21 ///\ref ReadMap Skeleton"readable map",21 ///\ref ReadMap "readable map", 22 22 ///so it is easy to change it to any kind of length. 23 23 /// … … 33 33 ///may involve in relatively time consuming process to compute the edge 34 34 ///length if it is necessary. The default map type is 35 ///\ref Graph Skeleton::EdgeMap "Graph::EdgeMap<int>"35 ///\ref Graph::EdgeMap "Graph::EdgeMap<int>" 36 36 ///\param Heap The heap type used by the %Dijkstra 37 37 ///algorithm. The default -
src/work/deba/list_graph.h
r703 r880 28 28 /// 29 29 ///It conforms to the graph interface documented under 30 ///the description of \ref Graph Skeleton.31 ///\sa \ref Graph Skeleton.30 ///the description of \ref Graph. 31 ///\sa \ref Graph. 32 32 class ListGraph { 33 33 … … 383 383 ///feature by 384 384 ///storing shared values for the edge pairs. The usual 385 ///\ref Graph Skeleton::EdgeMap "EdgeMap"385 ///\ref Graph::EdgeMap "EdgeMap" 386 386 ///can be used 387 387 ///as well. -
src/work/marci/experiment/graph_wrapper.h
r281 r880 162 162 163 163 template<typename GraphWrapper> 164 class GraphWrapper Skeleton{164 class GraphWrapper { 165 165 protected: 166 166 GraphWrapper gw; … … 185 185 GraphWrapper::NodeIt(n) { } 186 186 NodeIt(const Invalid& i) : GraphWrapper::NodeIt(i) { } 187 NodeIt(const GraphWrapper Skeleton<GraphWrapper>& _G) :187 NodeIt(const GraphWrapper<GraphWrapper>& _G) : 188 188 GraphWrapper::NodeIt(_G.gw) { } 189 189 }; … … 196 196 GraphWrapper::OutEdgeIt(e) { } 197 197 OutEdgeIt(const Invalid& i) : GraphWrapper::OutEdgeIt(i) { } 198 OutEdgeIt(const GraphWrapper Skeleton<GraphWrapper>& _G, const Node& n) :198 OutEdgeIt(const GraphWrapper<GraphWrapper>& _G, const Node& n) : 199 199 GraphWrapper::OutEdgeIt(_G.gw, n) { } 200 200 }; … … 206 206 GraphWrapper::InEdgeIt(e) { } 207 207 InEdgeIt(const Invalid& i) : GraphWrapper::InEdgeIt(i) { } 208 InEdgeIt(const GraphWrapper Skeleton<GraphWrapper>& _G, const Node& n) :208 InEdgeIt(const GraphWrapper<GraphWrapper>& _G, const Node& n) : 209 209 GraphWrapper::InEdgeIt(_G.gw, n) { } 210 210 }; … … 217 217 GraphWrapper::EdgeIt(e) { } 218 218 EdgeIt(const Invalid& i) : GraphWrapper::EdgeIt(i) { } 219 EdgeIt(const GraphWrapper Skeleton<GraphWrapper>& _G) :219 EdgeIt(const GraphWrapper<GraphWrapper>& _G) : 220 220 GraphWrapper::EdgeIt(_G.gw) { } 221 221 }; 222 222 223 223 224 //GraphWrapper Skeleton() : gw() { }225 GraphWrapper Skeleton(GraphWrapper _gw) : gw(_gw) { }224 //GraphWrapper() : gw() { } 225 GraphWrapper(GraphWrapper _gw) : gw(_gw) { } 226 226 227 227 //void setGraph(BaseGraph& _graph) { gw.setGraph(_graph); } … … 270 270 template<typename T> class NodeMap : public GraphWrapper::NodeMap<T> { 271 271 public: 272 NodeMap(const GraphWrapper Skeleton<GraphWrapper>& _G) :272 NodeMap(const GraphWrapper<GraphWrapper>& _G) : 273 273 GraphWrapper::NodeMap<T>(_G.gw) { } 274 NodeMap(const GraphWrapper Skeleton<GraphWrapper>& _G, T a) :274 NodeMap(const GraphWrapper<GraphWrapper>& _G, T a) : 275 275 GraphWrapper::NodeMap<T>(_G.gw, a) { } 276 276 }; … … 278 278 template<typename T> class EdgeMap : public GraphWrapper::EdgeMap<T> { 279 279 public: 280 EdgeMap(const GraphWrapper Skeleton<GraphWrapper>& _G) :280 EdgeMap(const GraphWrapper<GraphWrapper>& _G) : 281 281 GraphWrapper::EdgeMap<T>(_G.gw) { } 282 EdgeMap(const GraphWrapper Skeleton<GraphWrapper>& _G, T a) :282 EdgeMap(const GraphWrapper<GraphWrapper>& _G, T a) : 283 283 GraphWrapper::EdgeMap<T>(_G.gw, a) { } 284 284 }; … … 366 366 367 367 // template<typename /*Graph*/GraphWrapper 368 // /*=typename GraphWrapper Skeleton< TrivGraphWrapper<Graph>*/ >368 // /*=typename GraphWrapper< TrivGraphWrapper<Graph>*/ > 369 369 // class RevGraphWrapper : 370 // public GraphWrapper/*GraphWrapper Skeleton< TrivGraphWrapper<Graph> >*/ {370 // public GraphWrapper/*GraphWrapper< TrivGraphWrapper<Graph> >*/ { 371 371 // protected: 372 372 // //Graph* graph; … … 379 379 380 380 // //typedef typename Graph::Edge Edge; 381 // typedef typename GraphWrapper/*typename GraphWrapper Skeleton< TrivGraphWrapper<Graph> >*/::OutEdgeIt InEdgeIt;382 // typedef typename GraphWrapper/*typename GraphWrapper Skeleton< TrivGraphWrapper<Graph> >*/::InEdgeIt OutEdgeIt;381 // typedef typename GraphWrapper/*typename GraphWrapper< TrivGraphWrapper<Graph> >*/::OutEdgeIt InEdgeIt; 382 // typedef typename GraphWrapper/*typename GraphWrapper< TrivGraphWrapper<Graph> >*/::InEdgeIt OutEdgeIt; 383 383 // //typedef typename Graph::SymEdgeIt SymEdgeIt; 384 384 // //typedef typename Graph::EdgeIt EdgeIt; 385 385 386 386 // //RevGraphWrapper() : graph(0) { } 387 // RevGraphWrapper(GraphWrapper _gw/*BaseGraph& _graph*/) : GraphWrapper/*GraphWrapper Skeleton< TrivGraphWrapper<Graph> >*/(_gw/*TrivGraphWrapper<Graph>(_graph)*/) { }387 // RevGraphWrapper(GraphWrapper _gw/*BaseGraph& _graph*/) : GraphWrapper/*GraphWrapper< TrivGraphWrapper<Graph> >*/(_gw/*TrivGraphWrapper<Graph>(_graph)*/) { } 388 388 389 389 // //void setGraph(Graph& _graph) { graph = &_graph; } … … 430 430 431 431 // template<typename T> class NodeMap : 432 // public GraphWrapper/* Skeleton< TrivGraphWrapper<Graph> >*/::NodeMap<T>432 // public GraphWrapper/*< TrivGraphWrapper<Graph> >*/::NodeMap<T> 433 433 // { 434 434 // public: 435 435 // NodeMap(const RevGraphWrapper<GraphWrapper>& _gw) : 436 // GraphWrapper/* Skeleton< TrivGraphWrapper<Graph> >*/::NodeMap<T>(_gw) { }436 // GraphWrapper/*< TrivGraphWrapper<Graph> >*/::NodeMap<T>(_gw) { } 437 437 // NodeMap(const RevGraphWrapper<GraphWrapper>& _gw, T a) : 438 // GraphWrapper/* Skeleton< TrivGraphWrapper<Graph> >*/::NodeMap<T>(_gw, a) { }438 // GraphWrapper/*< TrivGraphWrapper<Graph> >*/::NodeMap<T>(_gw, a) { } 439 439 // }; 440 440 441 441 // template<typename T> class EdgeMap : 442 // public GraphWrapper/* Skeleton< TrivGraphWrapper<Graph> >*/::EdgeMap<T> {442 // public GraphWrapper/*< TrivGraphWrapper<Graph> >*/::EdgeMap<T> { 443 443 // public: 444 444 // EdgeMap(const RevGraphWrapper<GraphWrapper>& _gw) : 445 // GraphWrapper/* Skeleton< TrivGraphWrapper<Graph> >*/::EdgeMap<T>(_gw) { }445 // GraphWrapper/*< TrivGraphWrapper<Graph> >*/::EdgeMap<T>(_gw) { } 446 446 // EdgeMap(const RevGraphWrapper<GraphWrapper>& _gw, T a) : 447 // GraphWrapper/* Skeleton< TrivGraphWrapper<Graph> >*/::EdgeMap<T>(_gw, a) { }447 // GraphWrapper/*< TrivGraphWrapper<Graph> >*/::EdgeMap<T>(_gw, a) { } 448 448 // }; 449 449 // }; 450 450 451 451 template<typename GraphWrapper> 452 class RevGraphWrapper : public GraphWrapper Skeleton<GraphWrapper> {452 class RevGraphWrapper : public GraphWrapper<GraphWrapper> { 453 453 public: 454 typedef typename GraphWrapper Skeleton<GraphWrapper>::Node Node;455 typedef typename GraphWrapper Skeleton<GraphWrapper>::Edge Edge;454 typedef typename GraphWrapper<GraphWrapper>::Node Node; 455 typedef typename GraphWrapper<GraphWrapper>::Edge Edge; 456 456 //FIXME 457 457 //If GraphWrapper::OutEdgeIt is not defined … … 462 462 //Unfortunately all the typedefs are instantiated in templates, 463 463 //unlike other stuff 464 typedef typename GraphWrapper Skeleton<GraphWrapper>::OutEdgeIt InEdgeIt;465 typedef typename GraphWrapper Skeleton<GraphWrapper>::InEdgeIt OutEdgeIt;464 typedef typename GraphWrapper<GraphWrapper>::OutEdgeIt InEdgeIt; 465 typedef typename GraphWrapper<GraphWrapper>::InEdgeIt OutEdgeIt; 466 466 467 467 RevGraphWrapper(GraphWrapper _gw) : 468 GraphWrapper Skeleton<GraphWrapper>(_gw) { }468 GraphWrapper<GraphWrapper>(_gw) { } 469 469 470 470 Node head(const Edge& e) const 471 { return GraphWrapper Skeleton<GraphWrapper>::tail(e); }471 { return GraphWrapper<GraphWrapper>::tail(e); } 472 472 Node tail(const Edge& e) const 473 { return GraphWrapper Skeleton<GraphWrapper>::head(e); }473 { return GraphWrapper<GraphWrapper>::head(e); } 474 474 }; 475 475 476 476 //Subgraph on the same node-set and partial edge-set 477 477 template<typename GraphWrapper, typename EdgeFilterMap> 478 class SubGraphWrapper : public GraphWrapper Skeleton<GraphWrapper> {478 class SubGraphWrapper : public GraphWrapper<GraphWrapper> { 479 479 protected: 480 480 EdgeFilterMap* filter_map; 481 481 public: 482 typedef typename GraphWrapper Skeleton<GraphWrapper>::Node Node;483 typedef typename GraphWrapper Skeleton<GraphWrapper>::NodeIt NodeIt;484 typedef typename GraphWrapper Skeleton<GraphWrapper>::Edge Edge;485 typedef typename GraphWrapper Skeleton<GraphWrapper>::EdgeIt EdgeIt;486 typedef typename GraphWrapper Skeleton<GraphWrapper>::InEdgeIt InEdgeIt;487 typedef typename GraphWrapper Skeleton<GraphWrapper>::OutEdgeIt OutEdgeIt;482 typedef typename GraphWrapper<GraphWrapper>::Node Node; 483 typedef typename GraphWrapper<GraphWrapper>::NodeIt NodeIt; 484 typedef typename GraphWrapper<GraphWrapper>::Edge Edge; 485 typedef typename GraphWrapper<GraphWrapper>::EdgeIt EdgeIt; 486 typedef typename GraphWrapper<GraphWrapper>::InEdgeIt InEdgeIt; 487 typedef typename GraphWrapper<GraphWrapper>::OutEdgeIt OutEdgeIt; 488 488 489 489 SubGraphWrapper(GraphWrapper _gw, EdgeFilterMap& _filter_map) : 490 GraphWrapper Skeleton<GraphWrapper>(_gw), filter_map(&_filter_map) { }490 GraphWrapper<GraphWrapper>(_gw), filter_map(&_filter_map) { } 491 491 492 492 template<typename I> I& first(I& i) const { … … 678 678 679 679 template<typename GraphWrapper> 680 class UndirGraphWrapper : public GraphWrapper Skeleton<GraphWrapper> {680 class UndirGraphWrapper : public GraphWrapper<GraphWrapper> { 681 681 protected: 682 682 // GraphWrapper gw; … … 685 685 //typedef GraphWrapper BaseGraph; 686 686 687 typedef typename GraphWrapper Skeleton<GraphWrapper>::Node Node;688 typedef typename GraphWrapper Skeleton<GraphWrapper>::NodeIt NodeIt;687 typedef typename GraphWrapper<GraphWrapper>::Node Node; 688 typedef typename GraphWrapper<GraphWrapper>::NodeIt NodeIt; 689 689 690 690 //private: 691 691 //FIXME ezeknek valojaban a GraphWrapper megfelelo dolgai kellene hogy 692 692 //legyenek, at kell irni 693 typedef typename /*GraphWrapper Skeleton<GraphWrapper>*/693 typedef typename /*GraphWrapper<GraphWrapper>*/ 694 694 GraphWrapper::Edge GraphEdge; 695 typedef typename /*GraphWrapper Skeleton<GraphWrapper>*/695 typedef typename /*GraphWrapper<GraphWrapper>*/ 696 696 GraphWrapper::OutEdgeIt GraphOutEdgeIt; 697 typedef typename /*GraphWrapper Skeleton<GraphWrapper>*/697 typedef typename /*GraphWrapper<GraphWrapper>*/ 698 698 GraphWrapper::InEdgeIt GraphInEdgeIt; 699 699 //public: … … 701 701 //UndirGraphWrapper() : graph(0) { } 702 702 UndirGraphWrapper(GraphWrapper _gw) : 703 GraphWrapper Skeleton<GraphWrapper>(_gw) { }703 GraphWrapper<GraphWrapper>(_gw) { } 704 704 705 705 //UndirGraphWrapper(GraphWrapper _gw) : gw(_gw) { } … … 865 865 866 866 // template<typename T> class EdgeMap : 867 // public GraphWrapper Skeleton<GraphWrapper>::EdgeMap<T> {867 // public GraphWrapper<GraphWrapper>::EdgeMap<T> { 868 868 // public: 869 869 // EdgeMap(const UndirGraphWrapper<GraphWrapper>& _G) : 870 // GraphWrapper Skeleton<GraphWrapper>::EdgeMap<T>(_G.gw) { }870 // GraphWrapper<GraphWrapper>::EdgeMap<T>(_G.gw) { } 871 871 // EdgeMap(const UndirGraphWrapper<GraphWrapper>& _G, T a) : 872 872 // GraphWrapper::EdgeMap<T>(_G.gw, a) { } … … 948 948 949 949 template<typename GraphWrapper, typename Number, typename FlowMap, typename CapacityMap> 950 class ResGraphWrapper : public GraphWrapper Skeleton<GraphWrapper>{950 class ResGraphWrapper : public GraphWrapper<GraphWrapper>{ 951 951 public: 952 952 //typedef Graph BaseGraph; 953 953 //typedef TrivGraphWrapper<const Graph> GraphWrapper; 954 typedef typename GraphWrapper Skeleton<GraphWrapper>::Node Node;955 typedef typename GraphWrapper Skeleton<GraphWrapper>::NodeIt NodeIt;954 typedef typename GraphWrapper<GraphWrapper>::Node Node; 955 typedef typename GraphWrapper<GraphWrapper>::NodeIt NodeIt; 956 956 private: 957 typedef typename /*GraphWrapper Skeleton<GraphWrapper>*/957 typedef typename /*GraphWrapper<GraphWrapper>*/ 958 958 GraphWrapper::OutEdgeIt OldOutEdgeIt; 959 typedef typename /*GraphWrapper Skeleton<GraphWrapper>*/959 typedef typename /*GraphWrapper<GraphWrapper>*/ 960 960 GraphWrapper::InEdgeIt OldInEdgeIt; 961 961 protected: … … 968 968 ResGraphWrapper(const GraphWrapper& _gw, FlowMap& _flow, 969 969 const CapacityMap& _capacity) : 970 GraphWrapper Skeleton<GraphWrapper>(_gw),970 GraphWrapper<GraphWrapper>(_gw), 971 971 flow(&_flow), capacity(&_capacity) { } 972 972 … … 1265 1265 //Subgraph on the same node-set and partial edge-set 1266 1266 template<typename GraphWrapper, typename FirstOutEdgesMap> 1267 class ErasingFirstGraphWrapper : public GraphWrapper Skeleton<GraphWrapper> {1267 class ErasingFirstGraphWrapper : public GraphWrapper<GraphWrapper> { 1268 1268 protected: 1269 1269 FirstOutEdgesMap* first_out_edges; 1270 1270 public: 1271 typedef typename GraphWrapper Skeleton<GraphWrapper>::Node Node;1272 typedef typename GraphWrapper Skeleton<GraphWrapper>::NodeIt NodeIt;1273 typedef typename GraphWrapper Skeleton<GraphWrapper>::Edge Edge;1274 typedef typename GraphWrapper Skeleton<GraphWrapper>::EdgeIt EdgeIt;1275 typedef typename GraphWrapper Skeleton<GraphWrapper>::InEdgeIt InEdgeIt;1276 typedef typename GraphWrapper Skeleton<GraphWrapper>::OutEdgeIt OutEdgeIt;1271 typedef typename GraphWrapper<GraphWrapper>::Node Node; 1272 typedef typename GraphWrapper<GraphWrapper>::NodeIt NodeIt; 1273 typedef typename GraphWrapper<GraphWrapper>::Edge Edge; 1274 typedef typename GraphWrapper<GraphWrapper>::EdgeIt EdgeIt; 1275 typedef typename GraphWrapper<GraphWrapper>::InEdgeIt InEdgeIt; 1276 typedef typename GraphWrapper<GraphWrapper>::OutEdgeIt OutEdgeIt; 1277 1277 1278 1278 ErasingFirstGraphWrapper(GraphWrapper _gw, FirstOutEdgesMap& _first_out_edges) : 1279 GraphWrapper Skeleton<GraphWrapper>(_gw), first_out_edges(&_first_out_edges) { }1279 GraphWrapper<GraphWrapper>(_gw), first_out_edges(&_first_out_edges) { } 1280 1280 1281 1281 template<typename I> I& first(I& i) const { -
src/work/marci/experiment/graph_wrapper_1.h
r298 r880 759 759 760 760 // template<typename T> class EdgeMap : 761 // public GraphWrapper Skeleton<Graph>::EdgeMap<T> {761 // public GraphWrapper<Graph>::EdgeMap<T> { 762 762 // public: 763 763 // EdgeMap(const UndirGraphWrapper<Graph>& _G) : 764 // GraphWrapper Skeleton<Graph>::EdgeMap<T>(_G.gw) { }764 // GraphWrapper<Graph>::EdgeMap<T>(_G.gw) { } 765 765 // EdgeMap(const UndirGraphWrapper<Graph>& _G, T a) : 766 766 // Graph::EdgeMap<T>(_G.gw, a) { } -
src/work/peter/edgepathgraph.h
r826 r880 297 297 298 298 ///Read/write/reference map of the nodes to type \c T. 299 /// \sa MemoryMap Skeleton299 /// \sa MemoryMap 300 300 /// \todo We may need copy constructor 301 301 /// \todo We may need conversion from other nodetype … … 338 338 ///It behaves exactly in the same way as \ref NodeMap. 339 339 /// \sa NodeMap 340 /// \sa MemoryMap Skeleton340 /// \sa MemoryMap 341 341 /// \todo We may need copy constructor 342 342 /// \todo We may need conversion from other edgetype … … 375 375 /// 376 376 /// \todo This blabla could be replaced by a sepatate description about 377 /// Skeletons.377 /// s. 378 378 /// 379 379 /// It can be used for checking the interface compatibility, -
src/work/peter/hierarchygraph.h
r826 r880 424 424 425 425 ///Read/write/reference map of the nodes to type \c T. 426 /// \sa MemoryMap Skeleton426 /// \sa MemoryMap 427 427 /// \todo We may need copy constructor 428 428 /// \todo We may need conversion from other nodetype … … 483 483 ///It behaves exactly in the same way as \ref NodeMap. 484 484 /// \sa NodeMap 485 /// \sa MemoryMap Skeleton485 /// \sa MemoryMap 486 486 /// \todo We may need copy constructor 487 487 /// \todo We may need conversion from other edgetype … … 538 538 /// 539 539 /// \todo This blabla could be replaced by a sepatate description about 540 /// Skeletons.540 /// s. 541 541 /// 542 542 /// It can be used for checking the interface compatibility,
Note: See TracChangeset
for help on using the changeset viewer.