equal
deleted
inserted
replaced
642 //} else { |
642 //} else { |
643 // bfs_queue.pop(); |
643 // bfs_queue.pop(); |
644 //} |
644 //} |
645 } |
645 } |
646 void pushAndSetReached(NodeIt s) { |
646 void pushAndSetReached(NodeIt s) { |
|
647 actual_node=s; |
647 reached.set(s, true); |
648 reached.set(s, true); |
648 dfs_stack.push(G.template first<OutEdgeIt>(s)); |
649 dfs_stack.push(G.template first<OutEdgeIt>(s)); |
649 } |
650 } |
650 DfsIterator4<Graph, OutEdgeIt, ReachedMap>& |
651 DfsIterator4<Graph, OutEdgeIt, ReachedMap>& |
651 operator++() { |
652 operator++() { |
657 if (!reached.get(w)) { |
658 if (!reached.get(w)) { |
658 dfs_stack.push(G.template first<OutEdgeIt>(w)); |
659 dfs_stack.push(G.template first<OutEdgeIt>(w)); |
659 reached.set(w, true); |
660 reached.set(w, true); |
660 b_node_newly_reached=true; |
661 b_node_newly_reached=true; |
661 } else { |
662 } else { |
|
663 actual_node=G.aNode(actual_edge); |
662 ++(dfs_stack.top()); |
664 ++(dfs_stack.top()); |
663 b_node_newly_reached=false; |
665 b_node_newly_reached=false; |
664 } |
666 } |
665 } else { |
667 } else { |
666 //actual_node=G.aNode(dfs_stack.top()); |
668 //actual_node=G.aNode(dfs_stack.top()); |
670 } |
672 } |
671 bool finished() const { return dfs_stack.empty(); } |
673 bool finished() const { return dfs_stack.empty(); } |
672 operator OutEdgeIt () const { return actual_edge; } |
674 operator OutEdgeIt () const { return actual_edge; } |
673 bool isBNodeNewlyReached() const { return b_node_newly_reached; } |
675 bool isBNodeNewlyReached() const { return b_node_newly_reached; } |
674 bool isANodeExamined() const { return !(actual_edge.valid()); } |
676 bool isANodeExamined() const { return !(actual_edge.valid()); } |
675 NodeIt aNode() const { return actual_node; } |
677 NodeIt aNode() const { return actual_node; /*FIXME*/} |
676 NodeIt bNode() const { return G.bNode(actual_edge); } |
678 NodeIt bNode() const { return G.bNode(actual_edge); } |
677 const ReachedMap& getReachedMap() const { return reached; } |
679 const ReachedMap& getReachedMap() const { return reached; } |
678 const std::stack<OutEdgeIt>& getDfsStack() const { return dfs_stack; } |
680 const std::stack<OutEdgeIt>& getDfsStack() const { return dfs_stack; } |
679 }; |
681 }; |
680 |
682 |