Changeset 2111:ea1fa1bc3f6d in lemon0.x for lemon/list_graph.h
 Timestamp:
 06/28/06 17:06:24 (13 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2817
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/list_graph.h
r2107 r2111 275 275 276 276 protected: 277 void _changeTarget(Edge e, Node n)277 void changeTarget(Edge e, Node n) 278 278 { 279 279 if(edges[e.id].next_in != 1) … … 290 290 nodes[n.id].first_in = e.id; 291 291 } 292 void _changeSource(Edge e, Node n)292 void changeSource(Edge e, Node n) 293 293 { 294 294 if(edges[e.id].next_out != 1) … … 317 317 ///This is a simple and fast erasable graph implementation. 318 318 /// 319 ///It conforms to the 320 ///\ref concept::ErasableGraph "ErasableGraph" concept and 321 ///it also provides several additional useful extra functionalities. 322 ///\sa concept::ErasableGraph. 319 ///It conforms to the \ref concept::Graph "Graph" concept and it 320 ///also provides several additional useful extra functionalities. 321 ///The most of the member functions and nested classes are 322 ///documented only in the concept class. 323 ///\sa concept::Graph. 323 324 324 325 class ListGraph : public ExtendedListGraphBase { … … 326 327 327 328 typedef ExtendedListGraphBase Parent; 329 330 ///Add a new node to the graph. 331 332 /// \return the new node. 333 /// 334 Node addNode() { return Parent::addNode(); } 335 336 ///Add a new edge to the graph. 337 338 ///Add a new edge to the graph with source node \c s 339 ///and target node \c t. 340 ///\return the new edge. 341 Edge addEdge(const Node& s, const Node& t) { 342 return Parent::addEdge(s, t); 343 } 328 344 329 345 /// Changes the target of \c e to \c n … … 335 351 ///valid. However <tt>InEdge</tt>s are invalidated. 336 352 void changeTarget(Edge e, Node n) { 337 _changeTarget(e,n);353 Parent::changeTarget(e,n); 338 354 } 339 355 /// Changes the source of \c e to \c n … … 345 361 ///valid. However <tt>OutEdge</tt>s are invalidated. 346 362 void changeSource(Edge e, Node n) { 347 _changeSource(e,n);363 Parent::changeSource(e,n); 348 364 } 349 365 … … 355 371 void reverseEdge(Edge e) { 356 372 Node t=target(e); 357 _changeTarget(e,source(e));358 _changeSource(e,t);359 } 360 361 /// Using this it is possible to avoid the superfluous memory362 /// allocation.373 changeTarget(e,source(e)); 374 changeSource(e,t); 375 } 376 377 /// \brief Using this it is possible to avoid the superfluous memory 378 /// allocation. 363 379 364 380 ///Using this it is possible to avoid the superfluous memory … … 368 384 void reserveNode(int n) { nodes.reserve(n); }; 369 385 370 /// Using this it is possible to avoid the superfluous memory371 /// allocation.386 /// \brief Using this it is possible to avoid the superfluous memory 387 /// allocation. 372 388 373 389 ///Using this it is possible to avoid the superfluous memory … … 599 615 public: 600 616 typedef ExtendedListUGraphBase Parent; 617 /// \brief Add a new node to the graph. 618 /// 619 /// \return the new node. 620 /// 621 Node addNode() { return Parent::addNode(); } 622 623 /// \brief Add a new edge to the graph. 624 /// 625 /// Add a new edge to the graph with source node \c s 626 /// and target node \c t. 627 /// \return the new undirected edge. 628 UEdge addEdge(const Node& s, const Node& t) { 629 return Parent::addEdge(s, t); 630 } 601 631 /// \brief Changes the target of \c e to \c n 602 632 /// … … 607 637 /// valid. However <tt>InEdge</tt>'s are invalidated. 608 638 void changeTarget(UEdge e, Node n) { 609 _changeTarget(e,n);639 Parent::changeTarget(e,n); 610 640 } 611 641 /// Changes the source of \c e to \c n … … 617 647 ///valid. However <tt>OutEdge</tt>'s are invalidated. 618 648 void changeSource(UEdge e, Node n) { 619 _changeSource(e,n);649 Parent::changeSource(e,n); 620 650 } 621 651 /// \brief Contract two nodes.
Note: See TracChangeset
for help on using the changeset viewer.