COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
11/13/04 13:53:28 (20 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/bipartite_graph_wrapper.h

    r921 r986  
    168168//     InEdgeIt& next(InEdgeIt& i) const { this->graph->next(i.e); return i; }
    169169
    170 //     Node tail(const Edge& e) {
    171 //       if (!(*(this->s_false_t_true_map))[this->graph->tail(e)])
    172 //      return Node(this->graph->tail(e));
     170//     Node source(const Edge& e) {
     171//       if (!(*(this->s_false_t_true_map))[this->graph->source(e)])
     172//      return Node(this->graph->source(e));
    173173//       else
    174 //      return Node(this->graph->head(e));     
    175 //     }
    176 //     Node head(const Edge& e) {
    177 //       if (!(*(this->s_false_t_true_map))[this->graph->tail(e)])
    178 //      return Node(this->graph->head(e));
     174//      return Node(this->graph->target(e));   
     175//     }
     176//     Node target(const Edge& e) {
     177//       if (!(*(this->s_false_t_true_map))[this->graph->source(e)])
     178//      return Node(this->graph->target(e));
    179179//       else
    180 //      return Node(this->graph->tail(e));     
     180//      return Node(this->graph->source(e));   
    181181//     }
    182182
     
    253253
    254254    /// A new edge is inserted.
    255     ///\pre \c tail have to be in \c S_Class and \c head in \c T_Class.
    256     Edge addEdge(const Node& tail, const Node& head) {
    257       return Parent::graph->addEdge(tail, head);
     255    ///\pre \c source have to be in \c S_Class and \c target in \c T_Class.
     256    Edge addEdge(const Node& source, const Node& target) {
     257      return Parent::graph->addEdge(source, target);
    258258    }
    259259
     
    696696    }   
    697697
    698     Node tail(const Edge& e) const {
     698    Node source(const Edge& e) const {
    699699      switch (e.spec) {
    700700      case 0:
    701         return Node(this->graph->tail(e));
     701        return Node(this->graph->source(e));
    702702        break;
    703703      case 1:
     
    710710      }
    711711    }
    712     Node head(const Edge& e) const {
     712    Node target(const Edge& e) const {
    713713      switch (e.spec) {
    714714      case 0:
    715         return Node(this->graph->head(e));
     715        return Node(this->graph->target(e));
    716716        break;
    717717      case 1:
     
    733733    }
    734734 
    735     Node aNode(const OutEdgeIt& e) const { return tail(e); }
    736     Node aNode(const InEdgeIt& e) const { return head(e); }
    737     Node bNode(const OutEdgeIt& e) const { return head(e); }
    738     Node bNode(const InEdgeIt& e) const { return tail(e); }
     735    Node aNode(const OutEdgeIt& e) const { return source(e); }
     736    Node aNode(const InEdgeIt& e) const { return target(e); }
     737    Node bNode(const OutEdgeIt& e) const { return target(e); }
     738    Node bNode(const InEdgeIt& e) const { return source(e); }
    739739
    740740    void addNode() const { }
     
    742742   
    743743//    Node addNode() const { return Node(this->graph->addNode()); }
    744 //    Edge addEdge(const Node& tail, const Node& head) const {
    745 //      return Edge(this->graph->addEdge(tail, head)); }
     744//    Edge addEdge(const Node& source, const Node& target) const {
     745//      return Edge(this->graph->addEdge(source, target)); }
    746746
    747747//    void erase(const Node& i) const { this->graph->erase(i); }
Note: See TracChangeset for help on using the changeset viewer.