Changeset 880:9d0bfd35b97c in lemon-0.x for src/hugo
- Timestamp:
- 09/17/04 17:51:50 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1188
- Location:
- src/hugo
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.