M?g ?rtam bele 2 dolgot, meg a tesztelot is kibovitettem.
6 #include <list_graph.hh>
12 class string_int_map : public map<string,int> {
14 int get(const string &s) {
15 // Bocs, ez igy gaaaany, de nem volt kedvem utananezni, hogy
16 // hogy is mukodik ez a map :)
22 void set(const string &s, int i) {
30 typedef ListGraph::NodeIt NodeIt;
31 typedef ListGraph::EdgeIt EdgeIt;
32 typedef ListGraph::EachNodeIt EachNodeIt;
33 typedef ListGraph::EachEdgeIt EachEdgeIt;
38 NodeIt v1=G.addNode();
39 NodeIt v2=G.addNode();
40 NodeIt v3=G.addNode();
41 NodeIt v4=G.addNode();
55 ListGraph::EdgeMap<double> edge_cost_map(G, 2);
56 ListGraph::EdgeMap<bool> tree_map(G);
58 double k0lts = MinCostTreeKruskal(G, edge_cost_map, tree_map);
60 cout << k0lts << endl;