Nehany folyamalgoritmus futasi ideje, azzal a kozponti kerdessel, hogy a sok dereferalas
hasznalata/kerulese
optimalizalassal/optimalizalas nelkul
kulonbozo gepeken Celeron 600/karp
milyen futasi idoket eredmenyez.
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]);