Changeset 1546:3fcb8ae9cea1 in lemon-0.x
- Timestamp:
- 07/12/05 18:15:37 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2042
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/list_graph.h
r1470 r1546 276 276 277 277 protected: 278 void _ moveTarget(Edge e, Node n)278 void _changeTarget(Edge e, Node n) 279 279 { 280 280 if(edges[e.id].next_in != -1) … … 288 288 nodes[n.id].first_in = e.id; 289 289 } 290 void _ moveSource(Edge e, Node n)290 void _changeSource(Edge e, Node n) 291 291 { 292 292 if(edges[e.id].next_out != -1) … … 325 325 { 326 326 public: 327 /// Moves the target of \c e to \c n328 329 /// Moves the target of \c e to \c n327 /// Changes the target of \c e to \c n 328 329 /// Changes the target of \c e to \c n 330 330 /// 331 331 ///\note The <tt>Edge</tt>'s and <tt>OutEdge</tt>'s 332 ///referencing the moved edge remain332 ///referencing the changed edge remain 333 333 ///valid. However <tt>InEdge</tt>'s are invalidated. 334 void moveTarget(Edge e, Node n) { _moveTarget(e,n); }335 /// Moves the source of \c e to \c n336 337 /// Moves the source of \c e to \c n334 void changeTarget(Edge e, Node n) { _changeTarget(e,n); } 335 /// Changes the source of \c e to \c n 336 337 /// Changes the source of \c e to \c n 338 338 /// 339 339 ///\note The <tt>Edge</tt>'s and <tt>InEdge</tt>'s 340 ///referencing the moved edge remain340 ///referencing the changed edge remain 341 341 ///valid. However <tt>OutEdge</tt>'s are invalidated. 342 void moveSource(Edge e, Node n) { _moveSource(e,n); }342 void changeSource(Edge e, Node n) { _changeSource(e,n); } 343 343 344 344 /// Invert the direction of an edge. 345 345 346 346 ///\note The <tt>Edge</tt>'s 347 ///referencing the moved edge remain347 ///referencing the changed edge remain 348 348 ///valid. However <tt>OutEdge</tt>'s and <tt>InEdge</tt>'s are invalidated. 349 349 void reverseEdge(Edge e) { 350 350 Node t=target(e); 351 _ moveTarget(e,source(e));352 _ moveSource(e,t);351 _changeTarget(e,source(e)); 352 _changeSource(e,t); 353 353 } 354 354 … … 378 378 ++f; 379 379 if(r && target(e)==a) erase(e); 380 else moveSource(e,a);380 else changeSource(e,a); 381 381 e=f; 382 382 } … … 385 385 ++f; 386 386 if(r && source(e)==a) erase(e); 387 else moveTarget(e,a);387 else changeTarget(e,a); 388 388 e=f; 389 389 } … … 412 412 OutEdgeIt f=e; 413 413 ++f; 414 moveSource(e,b);414 changeSource(e,b); 415 415 e=f; 416 416 } … … 560 560 ///\sa concept::UndirGraph. 561 561 /// 562 ///\todo SnapShot, reverseEdge(), moveTarget(), moveSource(), contract()562 ///\todo SnapShot, reverseEdge(), changeTarget(), changeSource(), contract() 563 563 ///haven't been implemented yet. 564 564 ///
Note: See TracChangeset
for help on using the changeset viewer.