69 MinCostFlows< ListGraph, ListGraph::EdgeMap<int>, ConstMap<Edge, int> > |
69 MinCostFlows< ListGraph, ListGraph::EdgeMap<int>, ConstMap<Edge, int> > |
70 surb_test(graph, length, const1map); |
70 surb_test(graph, length, const1map); |
71 |
71 |
72 check( surb_test.run(s,t,k) == 2 && surb_test.totalLength() == 46,"Two paths, total length should be 46"); |
72 check( surb_test.run(s,t,k) == 2 && surb_test.totalLength() == 46,"Two paths, total length should be 46"); |
73 |
73 |
|
74 check(surb_test.checkSolution(), "Is the primal-dual solution pair really optimal?"); |
|
75 |
74 k=1; |
76 k=1; |
75 check( surb_test.run(s,t,k) == 1 && surb_test.totalLength() == 19,"One path, total length should be 19"); |
77 check( surb_test.run(s,t,k) == 1 && surb_test.totalLength() == 19,"One path, total length should be 19"); |
|
78 |
|
79 check(surb_test.checkSolution(), "Is the primal-dual solution pair really optimal?"); |
76 |
80 |
77 //cout << surb_test.run(s,t,k) << surb_test.totalLength()<<endl; |
81 //cout << surb_test.run(s,t,k) << surb_test.totalLength()<<endl; |
78 /* |
82 /* |
79 typedef DirPath<ListGraph> DPath; |
83 typedef DirPath<ListGraph> DPath; |
80 DPath P(graph); |
84 DPath P(graph); |