Changeset 986:e997802b855c in lemon-0.x for src/work/marci/bfs_mm.h
- Timestamp:
- 11/13/04 13:53:28 (19 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1376
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/marci/bfs_mm.h
r944 r986 72 72 //graph->first(actual_edge, s); 73 73 if (actual_edge!=INVALID) { 74 Node w=graph-> head(actual_edge);74 Node w=graph->target(actual_edge); 75 75 if (!(*reached_map)[w]) { 76 76 bfs_queue.push(w); … … 94 94 //++actual_edge; 95 95 if (actual_edge!=INVALID) { 96 Node w=graph-> head(actual_edge);96 Node w=graph->target(actual_edge); 97 97 if (!(*reached_map)[w]) { 98 98 bfs_queue.push(w); … … 109 109 //graph->first(actual_edge, bfs_queue.front()); 110 110 if (actual_edge!=INVALID) { 111 Node w=graph-> head(actual_edge);111 Node w=graph->target(actual_edge); 112 112 if (!(*reached_map)[w]) { 113 113 bfs_queue.push(w); … … 133 133 bool isANodeExamined() const { return actual_edge==INVALID; } 134 134 /// Returns a-node of the actual edge, so does if the edge is invalid. 135 Node tail() const { return bfs_queue.front(); }135 Node source() const { return bfs_queue.front(); } 136 136 /// \pre The actual edge have to be valid. 137 Node head() const { return graph->head(actual_edge); }137 Node target() const { return graph->target(actual_edge); } 138 138 /// Guess what? 139 139 /// \deprecated … … 232 232 if ((this->actual_edge)!=INVALID && this->b_node_newly_reached) 233 233 { 234 pred_map->set(this-> head(), this->actual_edge);235 pred_node_map->set(this-> head(), this->tail());236 dist_map->set(this-> head(), (*dist_map)[this->tail()]);234 pred_map->set(this->target(), this->actual_edge); 235 pred_node_map->set(this->target(), this->source()); 236 dist_map->set(this->target(), (*dist_map)[this->source()]); 237 237 } 238 238 return *this; … … 458 458 actual_edge=dfs_stack.top(); 459 459 if (actual_edge!=INVALID/*.valid()*/) { 460 Node w=graph-> head(actual_edge);460 Node w=graph->target(actual_edge); 461 461 actual_node=w; 462 462 if (!reached[w]) { … … 467 467 b_node_newly_reached=true; 468 468 } else { 469 actual_node=graph-> tail(actual_edge);469 actual_node=graph->source(actual_edge); 470 470 ++dfs_stack.top(); 471 471 b_node_newly_reached=false; … … 488 488 bool isANodeExamined() const { return actual_edge==INVALID; } 489 489 /// Returns a-node of the actual edge, so does if the edge is invalid. 490 Node tail() const { return actual_node; /*FIXME*/}490 Node source() const { return actual_node; /*FIXME*/} 491 491 /// Returns b-node of the actual edge. 492 492 /// \pre The actual edge have to be valid. 493 Node head() const { return graph->head(actual_edge); }493 Node target() const { return graph->target(actual_edge); } 494 494 /// Guess what? 495 495 /// \deprecated … … 545 545 if (this->graph->valid(this->actual_edge) && this->b_node_newly_reached) 546 546 { 547 pred.set(this-> head(), this->actual_edge);547 pred.set(this->target(), this->actual_edge); 548 548 } 549 549 return *this;
Note: See TracChangeset
for help on using the changeset viewer.