src/work/marci/bfs_dfs.h
changeset 604 4acd273c3009
parent 602 580b329c2a0c
child 615 b6b31b75b522
     1.1 --- a/src/work/marci/bfs_dfs.h	Tue May 11 09:30:06 2004 +0000
     1.2 +++ b/src/work/marci/bfs_dfs.h	Tue May 11 11:42:02 2004 +0000
     1.3 @@ -2,6 +2,14 @@
     1.4  #ifndef HUGO_BFS_DFS_H
     1.5  #define HUGO_BFS_DFS_H
     1.6  
     1.7 +// ///\ingroup gwrappers
     1.8 +///\file
     1.9 +///\brief Bfs and dfs iterators.
    1.10 +///
    1.11 +///This file contains bfs and dfs iterator classes.
    1.12 +///
    1.13 +// ///\author Marton Makai
    1.14 +
    1.15  #include <queue>
    1.16  #include <stack>
    1.17  #include <utility>
    1.18 @@ -37,7 +45,7 @@
    1.19      BfsIterator(const Graph& _graph) : 
    1.20        graph(&_graph), reached(*(new ReachedMap(*graph /*, false*/))), 
    1.21        own_reached_map(true) { }
    1.22 -    /// The storing the reached nodes have to be destroyed if 
    1.23 +    /// The map storing the reached nodes have to be destroyed if 
    1.24      /// it was constructed dynamically
    1.25      ~BfsIterator() { if (own_reached_map) delete &reached; }
    1.26      /// This method markes \c s reached.
    1.27 @@ -161,7 +169,7 @@
    1.28      }
    1.29      /// Beside the bfs iteration, \c pred and \dist are saved in a 
    1.30      /// newly reached node. 
    1.31 -    Bfs<Graph, ReachedMap, PredMap, DistMap> operator++() {
    1.32 +    Bfs<Graph, ReachedMap, PredMap, DistMap>& operator++() {
    1.33        Parent::operator++();
    1.34        if (this->graph->valid(this->actual_edge) && this->b_node_newly_reached) 
    1.35        {
    1.36 @@ -296,7 +304,7 @@
    1.37      }
    1.38      /// Beside the dfs iteration, \c pred is saved in a 
    1.39      /// newly reached node. 
    1.40 -    Dfs<Graph, ReachedMap, PredMap> operator++() {
    1.41 +    Dfs<Graph, ReachedMap, PredMap>& operator++() {
    1.42        Parent::operator++();
    1.43        if (this->graph->valid(this->actual_edge) && this->b_node_newly_reached) 
    1.44        {