diff -r fcdb561b8c78 -r 474f5508e9a2 src/work/athos/minlengthpaths_test.cc --- a/src/work/athos/minlengthpaths_test.cc Tue May 04 09:00:11 2004 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,128 +0,0 @@ -// -*- c++ -*- -//#include -//#include -//#include - -#include -#include - -using namespace hugo; - - -int main() -{ - - - typedef ListGraph::Node Node; - typedef ListGraph::Edge Edge; - - ListGraph graph; - - /* - //Marci példája - - - NodeIt s=graph.addNode(); - NodeIt v1=graph.addNode(); - NodeIt v2=graph.addNode(); - NodeIt v3=graph.addNode(); - NodeIt v4=graph.addNode(); - NodeIt t=graph.addNode(); - - - EdgeIt s_v1=graph.addEdge(s, v1); - EdgeIt s_v2=graph.addEdge(s, v2); - EdgeIt v1_v2=graph.addEdge(v1, v2); - EdgeIt v2_v1=graph.addEdge(v2, v1); - EdgeIt v1_v3=graph.addEdge(v1, v3); - EdgeIt v3_v2=graph.addEdge(v3, v2); - EdgeIt v2_v4=graph.addEdge(v2, v4); - EdgeIt v4_v3=graph.addEdge(v4, v3); - EdgeIt v3_t=graph.addEdge(v3, t); - EdgeIt v4_t=graph.addEdge(v4, t); - - ListGraph::EdgeMap length(graph); - - length.set(s_v1, 16); - length.set(s_v2, 13); - length.set(v1_v2, 10); - length.set(v2_v1, 4); - length.set(v1_v3, 12); - length.set(v3_v2, 9); - length.set(v2_v4, 14); - length.set(v4_v3, 7); - length.set(v3_t, 20); - length.set(v4_t, 4); - */ - - - //Ahuja könyv példája - - Node s=graph.addNode(); - Node v2=graph.addNode(); - Node v3=graph.addNode(); - Node v4=graph.addNode(); - Node v5=graph.addNode(); - Node t=graph.addNode(); - - Edge s_v2=graph.addEdge(s, 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); - - //Kis modositas - //edge_iterator v2_s=graph.add_edge(v2, s); - - ListGraph::EdgeMap length(graph); - - length.set(s_v2, 10); - length.set(s_v3, 10); - length.set(v2_v4, 5); - length.set(v2_v5, 8); - length.set(v3_v5, 5); - length.set(v4_t, 8); - length.set(v5_t, 8); - - //Kis modositas - //length.put(v2_s, 100); - - - - - /*Egyszerű példa - NodeIt s=flow_test.add_node(); - NodeIt v1=flow_test.add_node(); - NodeIt v2=flow_test.add_node(); - NodeIt t=flow_test.add_node(); - - node_property_vector node_name(flow_test); - node_name.put(s, "s"); - node_name.put(v1, "v1"); - node_name.put(v2, "v2"); - node_name.put(t, "t"); - - edge_iterator s_v1=flow_test.add_edge(s, v1); - edge_iterator v1_v2=flow_test.add_edge(v1, v2); - edge_iterator v2_t=flow_test.add_edge(v2, t); - - edge_property_vector length(flow_test); - - length.put(s_v1, 16); - length.put(v1_v2, 10); - length.put(v2_t, 4); - */ - - std::cout << "Suurballe algorithm test..." << std::endl; - - - int k=3; - MinLengthPaths > - surb_test(graph, length); - std::cout << surb_test.run(s,t,k) << std::endl; - - - return 0; -}