COIN-OR::LEMON - Graph Library

Changeset 986:e997802b855c in lemon-0.x for src/work/marci/bfs_mm.h


Ignore:
Timestamp:
11/13/04 13:53:28 (16 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1376
Message:

Naming changes:

  • head -> target
  • tail -> source
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/bfs_mm.h

    r944 r986  
    7272        //graph->first(actual_edge, s);
    7373        if (actual_edge!=INVALID) {
    74           Node w=graph->head(actual_edge);
     74          Node w=graph->target(actual_edge);
    7575          if (!(*reached_map)[w]) {
    7676            bfs_queue.push(w);
     
    9494        //++actual_edge;
    9595        if (actual_edge!=INVALID) {
    96           Node w=graph->head(actual_edge);
     96          Node w=graph->target(actual_edge);
    9797          if (!(*reached_map)[w]) {
    9898            bfs_queue.push(w);
     
    109109          //graph->first(actual_edge, bfs_queue.front());
    110110          if (actual_edge!=INVALID) {
    111             Node w=graph->head(actual_edge);
     111            Node w=graph->target(actual_edge);
    112112            if (!(*reached_map)[w]) {
    113113              bfs_queue.push(w);
     
    133133    bool isANodeExamined() const { return actual_edge==INVALID; }
    134134    /// 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(); }
    136136    /// \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); }
    138138    /// Guess what?
    139139    /// \deprecated
     
    232232      if ((this->actual_edge)!=INVALID && this->b_node_newly_reached)
    233233      {
    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()]);
    237237      }
    238238      return *this;
     
    458458      actual_edge=dfs_stack.top();
    459459      if (actual_edge!=INVALID/*.valid()*/) {
    460         Node w=graph->head(actual_edge);
     460        Node w=graph->target(actual_edge);
    461461        actual_node=w;
    462462        if (!reached[w]) {
     
    467467          b_node_newly_reached=true;
    468468        } else {
    469           actual_node=graph->tail(actual_edge);
     469          actual_node=graph->source(actual_edge);
    470470          ++dfs_stack.top();
    471471          b_node_newly_reached=false;
     
    488488    bool isANodeExamined() const { return actual_edge==INVALID; }
    489489    /// 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*/}
    491491    /// Returns b-node of the actual edge.
    492492    /// \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); }
    494494    /// Guess what?
    495495    /// \deprecated
     
    545545      if (this->graph->valid(this->actual_edge) && this->b_node_newly_reached)
    546546      {
    547         pred.set(this->head(), this->actual_edge);
     547        pred.set(this->target(), this->actual_edge);
    548548      }
    549549      return *this;
Note: See TracChangeset for help on using the changeset viewer.