diff -r c46cfb2651ec -r f485b3008cf5 src/test/min_length_paths_test.cc --- a/src/test/min_length_paths_test.cc Wed Sep 22 08:54:53 2004 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,94 +0,0 @@ -#include -#include -#include -//#include -#include "test_tools.h" - -using namespace std; -using namespace hugo; - - - -bool passed = true; - - -int main() -{ - - typedef ListGraph::Node Node; - typedef ListGraph::Edge Edge; - - ListGraph graph; - - //Ahuja könyv példája - - Node s=graph.addNode(); - Node v1=graph.addNode(); - Node v2=graph.addNode(); - Node v3=graph.addNode(); - Node v4=graph.addNode(); - Node v5=graph.addNode(); - Node t=graph.addNode(); - - Edge s_v1=graph.addEdge(s, v1); - Edge v1_v2=graph.addEdge(v1, v2); - Edge s_v3=graph.addEdge(s, v3); - Edge v2_v4=graph.addEdge(v2, v4); - Edge v2_v5=graph.addEdge(v2, v5); - Edge v3_v5=graph.addEdge(v3, v5); - Edge v4_t=graph.addEdge(v4, t); - Edge v5_t=graph.addEdge(v5, t); - - - ListGraph::EdgeMap length(graph); - - length.set(s_v1, 6); - length.set(v1_v2, 4); - length.set(s_v3, 10); - length.set(v2_v4, 5); - length.set(v2_v5, 1); - length.set(v3_v5, 5); - length.set(v4_t, 8); - length.set(v5_t, 8); - - std::cout << "Minlengthpaths algorithm test..." << std::endl; - - - int k=3; - MinLengthPaths< ListGraph, ListGraph::EdgeMap > - surb_test(graph, length); - - check( surb_test.run(s,t,k) == 2 && surb_test.totalLength() == 46, - "Two paths, total length should be 46"); - - check( surb_test.checkComplementarySlackness(), - "Complementary slackness conditions are not met."); - - // typedef DirPath DPath; - // DPath P(graph); - - /* - surb_test.getPath(P,0); - check(P.length() == 4, "First path should contain 4 edges."); - cout<