COIN-OR::LEMON - Graph Library

Changeset 986:e997802b855c in lemon-0.x for src/demo


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
Location:
src/demo
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/demo/dim_to_dot.cc

    r931 r986  
    5252  cout << "  edge [ shape=ellipse, fontname=Helvetica, fontsize=10 ];" << endl;
    5353  for(EdgeIt e(g); e!=INVALID; ++e) {
    54     cout << "  n" << g.id(g.tail(e)) << " -> " << " n" << g.id(g.head(e))
     54    cout << "  n" << g.id(g.source(e)) << " -> " << " n" << g.id(g.target(e))
    5555         << " [ label=\"" << g.id(e)
    5656         << ", length:" << length[e] << "\" ]; " << endl;
  • src/demo/sub_graph_wrapper_demo.cc

    r932 r986  
    3838  readDimacs(std::cin, g, length, s, t);
    3939
    40   cout << "edges with lengths (of form id, tail--length->head): " << endl;
     40  cout << "edges with lengths (of form id, source--length->target): " << endl;
    4141  for(EdgeIt e(g); e!=INVALID; ++e)
    42     cout << " " << g.id(e) << ", " << g.id(g.tail(e)) << "--"
    43          << length[e] << "->" << g.id(g.head(e)) << endl;
     42    cout << " " << g.id(e) << ", " << g.id(g.source(e)) << "--"
     43         << length[e] << "->" << g.id(g.target(e)) << endl;
    4444
    4545  cout << "s: " << g.id(s) << " t: " << g.id(t) << endl;
     
    7676    if (flow[e])
    7777      cout << " " << g.id(e) << ", "
    78            << g.id(g.tail(e)) << "--"
    79            << length[e] << "->" << g.id(g.head(e)) << endl;
     78           << g.id(g.source(e)) << "--"
     79           << length[e] << "->" << g.id(g.target(e)) << endl;
    8080}
  • src/demo/tight_edge_filter_map.h

    r929 r986  
    3232  /// A node-map node_potential is said to be a potential w.r.t.
    3333  /// an edge-map edge_distance
    34   /// if and only if for each edge e, node_potential[g.head(e)]
    35   /// <= edge_distance[e]+node_potential[g.tail(e)]
     34  /// if and only if for each edge e, node_potential[g.target(e)]
     35  /// <= edge_distance[e]+node_potential[g.source(e)]
    3636  /// (or the reverse inequality holds for each edge).
    3737  /// An edge is said to be tight if this inequality holds with equality,
     
    5252      edge_distance(&_edge_distance) { }
    5353    bool operator[](const typename Graph::Edge& e) const {
    54       return ((*node_potential)[g->head(e)] ==
    55               (*edge_distance)[e]+(*node_potential)[g->tail(e)]);
     54      return ((*node_potential)[g->target(e)] ==
     55              (*edge_distance)[e]+(*node_potential)[g->source(e)]);
    5656    }
    5757  };
Note: See TracChangeset for help on using the changeset viewer.