1.1 --- a/src/work/athos/pf_demo.cc Thu Mar 18 12:07:37 2004 +0000
1.2 +++ b/src/work/athos/pf_demo.cc Thu Mar 18 16:50:07 2004 +0000
1.3 @@ -23,9 +23,11 @@
1.4 typedef ListGraph::InEdgeIt InEdgeIt;
1.5 typedef ListGraph::SymEdgeIt SymEdgeIt;
1.6 */
1.7 -
1.8 + ListGraph flowG;
1.9 +
1.10 + /*
1.11 //Marci példája
1.12 - ListGraph flowG;
1.13 +
1.14
1.15 NodeIt s=flowG.addNode();
1.16 NodeIt v1=flowG.addNode();
1.17 @@ -58,62 +60,42 @@
1.18 cap.set(v4_v3, 7);
1.19 cap.set(v3_t, 20);
1.20 cap.set(v4_t, 4);
1.21 + */
1.22
1.23
1.24 + //Ahuja könyv példája
1.25
1.26 + NodeIt s=flowG.addNode();
1.27 + NodeIt v2=flowG.addNode();
1.28 + NodeIt v3=flowG.addNode();
1.29 + NodeIt v4=flowG.addNode();
1.30 + NodeIt v5=flowG.addNode();
1.31 + NodeIt t=flowG.addNode();
1.32
1.33 -
1.34 -
1.35 -
1.36 - /*
1.37 - //Ahuja könyv példája
1.38 - node_iterator s=flow_test.add_node();
1.39 - NodeIt v2=flow_test.add_node();
1.40 - NodeIt v3=flow_test.add_node();
1.41 - NodeIt v4=flow_test.add_node();
1.42 - NodeIt v5=flow_test.add_node();
1.43 - NodeIt t=flow_test.add_node();
1.44 -
1.45 - node_property_vector<list_graph, std::string> node_name(flow_test);
1.46 - node_name.put(s, "s");
1.47 - node_name.put(v2, "v2");
1.48 - node_name.put(v3, "v3");
1.49 - node_name.put(v4, "v4");
1.50 - node_name.put(v5, "v5");
1.51 - node_name.put(t, "t");
1.52 -
1.53 -
1.54 - edge_iterator s_v2=flow_test.add_edge(s, v2);
1.55 - edge_iterator s_v3=flow_test.add_edge(s, v3);
1.56 -
1.57 - edge_iterator v2_v4=flow_test.add_edge(v2, v4);
1.58 - edge_iterator v2_v5=flow_test.add_edge(v2, v5);
1.59 -
1.60 - edge_iterator v3_v5=flow_test.add_edge(v3, v5);
1.61 -
1.62 - edge_iterator v4_t=flow_test.add_edge(v4, t);
1.63 - edge_iterator v5_t=flow_test.add_edge(v5, t);
1.64 + EdgeIt s_v2=flowG.addEdge(s, v2);
1.65 + EdgeIt s_v3=flowG.addEdge(s, v3);
1.66 + EdgeIt v2_v4=flowG.addEdge(v2, v4);
1.67 + EdgeIt v2_v5=flowG.addEdge(v2, v5);
1.68 + EdgeIt v3_v5=flowG.addEdge(v3, v5);
1.69 + EdgeIt v4_t=flowG.addEdge(v4, t);
1.70 + EdgeIt v5_t=flowG.addEdge(v5, t);
1.71
1.72 //Kis modositas
1.73 - edge_iterator v2_s=flow_test.add_edge(v2, s);
1.74 + //edge_iterator v2_s=flowG.add_edge(v2, s);
1.75
1.76 - edge_property_vector<list_graph, int> cap(flow_test);
1.77 - cap.put(s_v2, 10);
1.78 - cap.put(s_v3, 10);
1.79 - cap.put(v2_v4, 5);
1.80 - cap.put(v2_v5, 8);
1.81 - cap.put(v3_v5, 5);
1.82 - cap.put(v4_t, 8);
1.83 - cap.put(v5_t, 8);
1.84 + ListGraph::EdgeMap<int> cap(flowG);
1.85 +
1.86 + cap.set(s_v2, 10);
1.87 + cap.set(s_v3, 10);
1.88 + cap.set(v2_v4, 5);
1.89 + cap.set(v2_v5, 8);
1.90 + cap.set(v3_v5, 5);
1.91 + cap.set(v4_t, 8);
1.92 + cap.set(v5_t, 8);
1.93
1.94 //Kis modositas
1.95 - cap.put(v2_s, 100);
1.96 -
1.97 - //Kis modositas
1.98 - //edge_iterator t_s=flow_test.add_edge(t, s);
1.99 - //cap.put(t_s, 20);
1.100 -
1.101 - */
1.102 + //cap.put(v2_s, 100);
1.103 +
1.104
1.105
1.106