equal
deleted
inserted
replaced
67 MinLengthPaths< ListGraph, ListGraph::EdgeMap<int> > |
67 MinLengthPaths< ListGraph, ListGraph::EdgeMap<int> > |
68 surb_test(graph, length); |
68 surb_test(graph, length); |
69 |
69 |
70 check( surb_test.run(s,t,k) == 2 && surb_test.totalLength() == 46,"Two paths, total length should be 46"); |
70 check( surb_test.run(s,t,k) == 2 && surb_test.totalLength() == 46,"Two paths, total length should be 46"); |
71 |
71 |
|
72 check( surb_test.checkComplementarySlackness(), "Complementary slackness conditions are not met."); |
|
73 |
72 typedef DirPath<ListGraph> DPath; |
74 typedef DirPath<ListGraph> DPath; |
73 DPath P(graph); |
75 DPath P(graph); |
74 |
76 |
75 surb_test.getPath(P,0); |
77 surb_test.getPath(P,0); |
76 check(P.length() == 4, "First path should contain 4 edges."); |
78 check(P.length() == 4, "First path should contain 4 edges."); |
78 surb_test.getPath(P,1); |
80 surb_test.getPath(P,1); |
79 check(P.length() == 3, "Second path: 3 edges."); |
81 check(P.length() == 3, "Second path: 3 edges."); |
80 |
82 |
81 k=1; |
83 k=1; |
82 check( surb_test.run(s,t,k) == 1 && surb_test.totalLength() == 19,"One path, total length should be 19"); |
84 check( surb_test.run(s,t,k) == 1 && surb_test.totalLength() == 19,"One path, total length should be 19"); |
|
85 |
|
86 check( surb_test.checkComplementarySlackness(), "Complementary slackness conditions are not met."); |
83 |
87 |
84 surb_test.getPath(P,0); |
88 surb_test.getPath(P,0); |
85 check(P.length() == 4, "First path should contain 4 edges."); |
89 check(P.length() == 4, "First path should contain 4 edges."); |
86 |
90 |
87 cout << (passed ? "All tests passed." : "Some of the tests failed!!!") |
91 cout << (passed ? "All tests passed." : "Some of the tests failed!!!") |