Changeset 158:4f54d89fa9d2 in lemon-0.x for src/work/bfs_iterator.hh
- Timestamp:
- 03/08/04 13:29:07 (21 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@223
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/bfs_iterator.hh
r148 r158 624 624 625 625 626 template <typename GraphWrapper, typename OutEdgeIt,626 template <typename GraphWrapper, /*typename OutEdgeIt,*/ 627 627 typename ReachedMap/*=typename GraphWrapper::NodeMap<bool>*/ > 628 628 class BfsIterator5 { 629 629 typedef typename GraphWrapper::NodeIt NodeIt; 630 typedef typename GraphWrapper::OutEdgeIt OutEdgeIt; 630 631 GraphWrapper G; 631 632 std::queue<NodeIt> bfs_queue; … … 641 642 G(_G), reached(*(new ReachedMap(G /*, false*/))), 642 643 own_reached_map(true) { } 644 // BfsIterator5(const typename GraphWrapper::BaseGraph& _G, 645 // ReachedMap& _reached) : 646 // G(_G), reached(_reached), 647 // own_reached_map(false) { } 648 // BfsIterator5(const typename GraphWrapper::BaseGraph& _G) : 649 // G(_G), reached(*(new ReachedMap(G /*, false*/))), 650 // own_reached_map(true) { } 643 651 ~BfsIterator5() { if (own_reached_map) delete &reached; } 644 652 void pushAndSetReached(NodeIt s) { … … 661 669 } 662 670 } 663 BfsIterator5<GraphWrapper, OutEdgeIt,ReachedMap>&671 BfsIterator5<GraphWrapper, /*OutEdgeIt,*/ ReachedMap>& 664 672 operator++() { 665 673 if (G.valid(actual_edge)/*.valid()*/) { … … 759 767 }; 760 768 761 template <typename GraphWrapper, typename OutEdgeIt,769 template <typename GraphWrapper, /*typename OutEdgeIt,*/ 762 770 typename ReachedMap/*=typename GraphWrapper::NodeMap<bool>*/ > 763 771 class DfsIterator5 { 764 772 typedef typename GraphWrapper::NodeIt NodeIt; 773 typedef typename GraphWrapper::OutEdgeIt OutEdgeIt; 765 774 GraphWrapper G; 766 775 std::stack<OutEdgeIt> dfs_stack; … … 783 792 dfs_stack.push(G.template first<OutEdgeIt>(s)); 784 793 } 785 DfsIterator5<GraphWrapper, OutEdgeIt,ReachedMap>&794 DfsIterator5<GraphWrapper, /*OutEdgeIt,*/ ReachedMap>& 786 795 operator++() { 787 796 actual_edge=dfs_stack.top();
Note: See TracChangeset
for help on using the changeset viewer.