Changeset 986:e997802b855c in lemon-0.x for src/demo
- Timestamp:
- 11/13/04 13:53:28 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1376
- Location:
- src/demo
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/demo/dim_to_dot.cc
r931 r986 52 52 cout << " edge [ shape=ellipse, fontname=Helvetica, fontsize=10 ];" << endl; 53 53 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)) 55 55 << " [ label=\"" << g.id(e) 56 56 << ", length:" << length[e] << "\" ]; " << endl; -
src/demo/sub_graph_wrapper_demo.cc
r932 r986 38 38 readDimacs(std::cin, g, length, s, t); 39 39 40 cout << "edges with lengths (of form id, tail--length->head): " << endl;40 cout << "edges with lengths (of form id, source--length->target): " << endl; 41 41 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; 44 44 45 45 cout << "s: " << g.id(s) << " t: " << g.id(t) << endl; … … 76 76 if (flow[e]) 77 77 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; 80 80 } -
src/demo/tight_edge_filter_map.h
r929 r986 32 32 /// A node-map node_potential is said to be a potential w.r.t. 33 33 /// 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)] 36 36 /// (or the reverse inequality holds for each edge). 37 37 /// An edge is said to be tight if this inequality holds with equality, … … 52 52 edge_distance(&_edge_distance) { } 53 53 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)]); 56 56 } 57 57 };
Note: See TracChangeset
for help on using the changeset viewer.