COIN-OR::LEMON - Graph Library

Changeset 986:e997802b855c in lemon-0.x for src/work/deba/list_graph.h


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

    r921 r986  
    4444    struct EdgeT
    4545    {
    46       int head, tail;
     46      int target, source;
    4747      int prev_in, prev_out;
    4848      int next_in, next_out;
     
    105105    int maxEdgeId() const { return edges.size(); }  //FIXME: What is this?
    106106
    107     Node tail(Edge e) const { return edges[e.n].tail; }
    108     Node head(Edge e) const { return edges[e.n].head; }
    109 
    110     Node aNode(OutEdgeIt e) const { return edges[e.n].tail; }
    111     Node aNode(InEdgeIt e) const { return edges[e.n].head; }
    112 
    113     Node bNode(OutEdgeIt e) const { return edges[e.n].head; }
    114     Node bNode(InEdgeIt e) const { return edges[e.n].tail; }
     107    Node source(Edge e) const { return edges[e.n].source; }
     108    Node target(Edge e) const { return edges[e.n].target; }
     109
     110    Node aNode(OutEdgeIt e) const { return edges[e.n].source; }
     111    Node aNode(InEdgeIt e) const { return edges[e.n].target; }
     112
     113    Node bNode(OutEdgeIt e) const { return edges[e.n].target; }
     114    Node bNode(InEdgeIt e) const { return edges[e.n].source; }
    115115
    116116    NodeIt& first(NodeIt& v) const {
     
    152152      else {
    153153        int n;
    154         for(n=nodes[edges[it.n].head].next;
     154        for(n=nodes[edges[it.n].target].next;
    155155            n!=-1 && nodes[n].first_in == -1;
    156156            n = nodes[n].next) ;
     
    208208      }
    209209     
    210       edges[n].tail = u.n; edges[n].head = v.n;
     210      edges[n].source = u.n; edges[n].target = v.n;
    211211
    212212      edges[n].next_out = nodes[u.n].first_out;
     
    233233      if(edges[n].prev_in!=-1)
    234234        edges[edges[n].prev_in].next_in = edges[n].next_in;
    235       else nodes[edges[n].head].first_in = edges[n].next_in;
     235      else nodes[edges[n].target].first_in = edges[n].next_in;
    236236     
    237237      if(edges[n].next_out!=-1)
     
    239239      if(edges[n].prev_out!=-1)
    240240        edges[edges[n].prev_out].next_out = edges[n].next_out;
    241       else nodes[edges[n].tail].first_out = edges[n].next_out;
     241      else nodes[edges[n].source].first_out = edges[n].next_out;
    242242     
    243243      edges[n].next_in = first_free_edge;
Note: See TracChangeset for help on using the changeset viewer.