COIN-OR::LEMON - Graph Library

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


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
Location:
src/work/marci/leda
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/leda/bipartite_matching_comparison.cc

    r921 r986  
    130130
    131131  FOR_EACH_LOC(BGW::EdgeIt, e, bgw)
    132     hg.addEdge(b_s_nodes[bgw.tail(e)], b_t_nodes[bgw.head(e)]);
     132    hg.addEdge(b_s_nodes[bgw.source(e)], b_t_nodes[bgw.target(e)]);
    133133
    134134  ConstMap<SageGraph::Edge, int> cm(1);
  • src/work/marci/leda/leda_graph_wrapper.h

    r921 r986  
    214214//     }
    215215
    216     ///Gives back the head node of an edge.
    217     Node head(Edge e) const {
     216    ///Gives back the target node of an edge.
     217    Node target(Edge e) const {
    218218      return Node(l_graph->target(e.l_e));
    219219    }
    220     ///Gives back the tail node of an edge.
    221     Node tail(Edge e) const {
     220    ///Gives back the source node of an edge.
     221    Node source(Edge e) const {
    222222      return Node(l_graph->source(e.l_e));
    223223    }
    224224 
    225     Node aNode(InEdgeIt e) const { return head(e); }
    226     Node aNode(OutEdgeIt e) const { return tail(e); }
     225    Node aNode(InEdgeIt e) const { return target(e); }
     226    Node aNode(OutEdgeIt e) const { return source(e); }
    227227    //   Node aNode(SymEdgeIt) const {}
    228228
    229     Node bNode(InEdgeIt e) const { return tail(e); }
    230     Node bNode(OutEdgeIt e) const { return head(e); }
     229    Node bNode(InEdgeIt e) const { return source(e); }
     230    Node bNode(OutEdgeIt e) const { return target(e); }
    231231    //   Node bNode(SymEdgeIt) const {}
    232232
     
    245245 
    246246    Node addNode() const { return Node(l_graph->new_node()); }
    247     Edge addEdge(Node tail, Node head) const {
    248       return Edge(l_graph->new_edge(tail.l_n, head.l_n));
     247    Edge addEdge(Node source, Node target) const {
     248      return Edge(l_graph->new_edge(source.l_n, target.l_n));
    249249    }
    250250   
  • src/work/marci/leda/max_bipartite_matching_demo.cc

    r921 r986  
    104104//     cout << "out edges: ";
    105105//     for(OutEdgeIt e=G.first<OutEdgeIt>(n); G.valid(e); G.next(e))
    106 //       cout << G.id(G.tail(e)) << "->" << G.id(G.head(e)) << " ";
     106//       cout << G.id(G.source(e)) << "->" << G.id(G.target(e)) << " ";
    107107//     cout << "in edges: ";
    108108//     for(InEdgeIt e=G.first<InEdgeIt>(n); G.valid(e); G.next(e))
    109 //       cout << G.id(G.tail(e)) << "->" << G.id(G.head(e)) << " ";
     109//       cout << G.id(G.source(e)) << "->" << G.id(G.target(e)) << " ";
    110110//     cout << endl;
    111111//   }
     
    124124    while (max_flow_test.augmentOnShortestPath()) {
    125125//       for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e)) 
    126 //      std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
     126//      std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
    127127//       std::cout<<std::endl;
    128128      ++i;
     
    132132//     for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e)) 
    133133//       if (flow.get(e))
    134 //      std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
     134//      std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
    135135//     std::cout<<std::endl;
    136136//     std::cout << "edges which are not in this maximum matching: "<< std::endl;
    137137//     for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e)) 
    138138//       if (!flow.get(e))
    139 //      std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
     139//      std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
    140140//     std::cout<<std::endl;
    141141   
     
    157157//     while (max_flow_test.augmentOnBlockingFlow2()) {
    158158// //       for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e)) 
    159 // //   std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
     159// //   std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
    160160// //       std::cout<<std::endl;
    161161//       ++i;
     
    165165// //     for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e)) 
    166166// //       if (flow.get(e))
    167 // //   std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
     167// //   std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
    168168// //     std::cout<<std::endl;
    169169// //     std::cout << "edges which are not in this maximum matching: "<< std::endl;
    170170// //     for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e)) 
    171171// //       if (!flow.get(e))
    172 // //   std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
     172// //   std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
    173173// //     std::cout<<std::endl;
    174174   
     
    199199//     for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e)) 
    200200//       if (flow.get(e))
    201 //      std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
     201//      std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
    202202//     std::cout<<std::endl;
    203203//     std::cout << "edges which are not in this maximum matching: "<< std::endl;
    204204//     for(EdgeIt e=G.first<EdgeIt>(); G.valid(e); G.next(e)) 
    205205//       if (!flow.get(e))
    206 //      std::cout << G.id(G.tail(e)) << "-" << flow.get(e) << "->" << G.id(G.head(e)) << " ";
     206//      std::cout << G.id(G.source(e)) << "-" << flow.get(e) << "->" << G.id(G.target(e)) << " ";
    207207//     std::cout<<std::endl;
    208208   
Note: See TracChangeset for help on using the changeset viewer.