Changeset 2439:3f1c7a6c33cd in lemon-0.x for lemon/dijkstra.h
- Timestamp:
- 05/07/07 10:49:57 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3276
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/dijkstra.h
r2391 r2439 602 602 Node nextNode() 603 603 { 604 return _heap->empty()?_heap->top():INVALID;604 return !_heap->empty()?_heap->top():INVALID; 605 605 } 606 606 … … 665 665 ///\param nm must be a bool (or convertible) node map. The algorithm 666 666 ///will stop when it reaches a node \c v with <tt>nm[v]==true</tt>. 667 /// 668 ///\return The reached node \c v with <tt>nm[v]==true<\tt> or 669 ///\c INVALID if no such node was found. 667 670 template<class NodeBoolMap> 668 voidstart(const NodeBoolMap &nm)671 Node start(const NodeBoolMap &nm) 669 672 { 670 673 while ( !_heap->empty() && !nm[_heap->top()] ) processNextNode(); 671 if ( !_heap->empty() ) finalizeNodeData(_heap->top(),_heap->prio()); 674 if ( _heap->empty() ) return INVALID; 675 finalizeNodeData(_heap->top(),_heap->prio()); 676 return _heap->top(); 672 677 } 673 678
Note: See TracChangeset
for help on using the changeset viewer.