src/work/marci/bfs_iterator.h
changeset 425 4fbe868c1fb4
parent 414 3fd2eec272e0
child 448 510c53fd06cd
equal deleted inserted replaced
5:5af238213ad4 6:094bd4b5b3fe
   125       push(s);
   125       push(s);
   126       while (!this->finished()) this->operator++();
   126       while (!this->finished()) this->operator++();
   127     }
   127     }
   128     Bfs<Graph, ReachedMap, PredMap, DistMap> operator++() {
   128     Bfs<Graph, ReachedMap, PredMap, DistMap> operator++() {
   129       Parent::operator++();
   129       Parent::operator++();
   130       if (this->graph->valid(this->actual_edge) && this->b_node_newly_reached) {
   130       if (this->graph->valid(this->actual_edge) && this->b_node_newly_reached) 
   131 	pred.set(s, actual_edge);
   131       {
   132 	dist.set(s, dist[this->aNode()]);
   132 	pred.set(this->bNode(), this->actual_edge);
       
   133 	dist.set(this->bNode(), dist[this->aNode()]);
   133       }
   134       }
   134       return *this;
   135       return *this;
   135     }
   136     }
   136     const PredMap& getPredMap() const { return pred; }
   137     const PredMap& getPredMap() const { return pred; }
   137     const DistMap& getDistMap() const { return dist; }
   138     const DistMap& getDistMap() const { return dist; }