COIN-OR::LEMON - Graph Library

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/lemon/undir_graph_extender.h

    r981 r986  
    7171    }
    7272
    73     /// Tail of the given Edge.
    74     Node tail(const Edge &e) const {
    75       return e.forward ? Parent::tail(e) : Parent::head(e);
     73    /// Source of the given Edge.
     74    Node source(const Edge &e) const {
     75      return e.forward ? Parent::source(e) : Parent::target(e);
    7676    }
    7777
    78     /// \todo Shouldn't the "tail" of an undirected edge be called "aNode"
     78    /// \todo Shouldn't the "source" of an undirected edge be called "aNode"
    7979    /// or something???
    80     using Parent::tail;
     80    using Parent::source;
    8181
    82     /// Head of the given Edge.
    83     Node head(const Edge &e) const {
    84       return e.forward ? Parent::head(e) : Parent::tail(e);
     82    /// Target of the given Edge.
     83    Node target(const Edge &e) const {
     84      return e.forward ? Parent::target(e) : Parent::source(e);
    8585    }
    8686
    87     /// \todo Shouldn't the "head" of an undirected edge be called "bNode"
     87    /// \todo Shouldn't the "target" of an undirected edge be called "bNode"
    8888    /// or something???
    89     using Parent::head;
     89    using Parent::target;
    9090
    9191    /// Returns whether the given directed edge is same orientation as the
     
    9797
    9898    Node oppsiteNode(const Node &n, const Edge &e) const {
    99       if( n == Parent::tail(e))
    100         return Parent::head(e);
    101       else if( n == Parent::head(e))
    102         return Parent::tail(e);
     99      if( n == Parent::source(e))
     100        return Parent::target(e);
     101      else if( n == Parent::target(e))
     102        return Parent::source(e);
    103103      else
    104104        return INVALID;
     
    148148        Parent::nextOut(e);
    149149        if( UndirEdge(e) == INVALID ) {
    150           Parent::firstIn(e, Parent::tail(e));
     150          Parent::firstIn(e, Parent::source(e));
    151151          e.forward = false;
    152152        }
     
    160160        Parent::nextIn(e);
    161161        if( UndirEdge(e) == INVALID ) {
    162           Parent::firstOut(e, Parent::head(e));
     162          Parent::firstOut(e, Parent::target(e));
    163163          e.forward = false;
    164164        }
Note: See TracChangeset for help on using the changeset viewer.