Several changes in Kruskal alg.
- Input object interface was changed to an STL compatible one.
- template parameters of class KruskalPairVec has been simplified.
- (the most of) the names meet the naming conventions.
- a lot of (but still not enough) documentation has been added.
- class KruskalMapVec has been commented out.
10 template<typename Graph, typename CapacityMap>
11 void readDimacsMaxFlow(std::istream& is, Graph &G, typename Graph::NodeIt &s, typename Graph::NodeIt &t, CapacityMap& capacity) {
20 std::vector<typename Graph::NodeIt> nodes;
29 case 'p': //problem definition
30 is >> problem >> n >> m;
33 for (int k=1; k<=n; ++k) nodes[k]=G.addNode();
35 case 'n': //node definition
36 if (problem=="sp") { //shortest path problem
41 if (problem=="max") { //max flow problem
44 if (d=='s') s=nodes[i];
45 if (d=='t') t=nodes[i];
51 typename Graph::EdgeIt e=G.addEdge(nodes[i], nodes[j]);