69 ECostMap edge_cost_map(G, 2); |
69 ECostMap edge_cost_map(G, 2); |
70 EBoolMap tree_map(G); |
70 EBoolMap tree_map(G); |
71 |
71 |
72 |
72 |
73 cout << "Uniform 2-es koltseggel: " |
73 cout << "Uniform 2-es koltseggel: " |
74 << kruskal1(G, edge_cost_map, tree_map) |
74 << Kruskal_EdgeCostMapIn_BoolMapOut(G, edge_cost_map, tree_map) |
75 << endl; |
75 << endl; |
76 |
76 |
77 |
77 |
78 edge_cost_map.set(e1, -10); |
78 edge_cost_map.set(e1, -10); |
79 edge_cost_map.set(e2, -9); |
79 edge_cost_map.set(e2, -9); |
87 edge_cost_map.set(e10, -1); |
87 edge_cost_map.set(e10, -1); |
88 |
88 |
89 vector<Edge> tree_edge_vec; |
89 vector<Edge> tree_edge_vec; |
90 |
90 |
91 cout << "Nemkonst koltseggel (-31): " |
91 cout << "Nemkonst koltseggel (-31): " |
92 << kruskal2(G, edge_cost_map, back_inserter(tree_edge_vec)) |
92 << Kruskal_EdgeCostMapIn_IteratorOut(G, edge_cost_map, |
|
93 back_inserter(tree_edge_vec)) |
93 << endl; |
94 << endl; |
94 |
95 |
95 int i = 1; |
96 int i = 1; |
|
97 for(vector<Edge>::iterator e = tree_edge_vec.begin(); |
|
98 e != tree_edge_vec.end(); ++e, ++i) { |
|
99 cout << i << ". el: " << *e << endl; |
|
100 } |
|
101 |
|
102 tree_edge_vec.clear(); |
|
103 SequenceOutput< back_insert_iterator< vector<Edge> > > |
|
104 vec_filler(back_inserter(tree_edge_vec)); |
|
105 cout << "Nemkonst koltseggel tarhatekonyabban: " |
|
106 << Kruskal(G, |
|
107 KruskalMapVec<ECostMap>(G, edge_cost_map), |
|
108 vec_filler) |
|
109 << endl; |
|
110 |
|
111 i = 1; |
96 for(vector<Edge>::iterator e = tree_edge_vec.begin(); |
112 for(vector<Edge>::iterator e = tree_edge_vec.begin(); |
97 e != tree_edge_vec.end(); ++e, ++i) { |
113 e != tree_edge_vec.end(); ++e, ++i) { |
98 cout << i << ". el: " << *e << endl; |
114 cout << i << ". el: " << *e << endl; |
99 } |
115 } |
100 |
116 |