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.
11 template<typename Graph, typename CapacityMap>
12 void readDimacsMaxFlow(std::istream& is, Graph &G, typename Graph::Node &s, typename Graph::Node &t, CapacityMap& capacity) {
21 typename Graph::Edge e;
22 std::vector<typename Graph::Node> nodes;
28 case 'p': //problem definition
29 is >> problem >> n >> m;
32 for (int k=1; k<=n; ++k) nodes[k]=G.addNode();
34 case 'n': //node definition
35 if (problem=="sp") { //shortest path problem
40 if (problem=="max") { //max flow problem
43 if (d=='s') s=nodes[i];
44 if (d=='t') t=nodes[i];
50 e=G.addEdge(nodes[i], nodes[j]);
60 #endif //HUGO_DIMACS_H