diff -r ee5959aa4410 -r c280de819a73 src/work/athos/pf_demo.cc --- a/src/work/athos/pf_demo.cc Sun Apr 17 18:57:22 2005 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,104 +0,0 @@ -#include -#include -#include - -#include "list_graph.h" -//#include "marci_graph_traits.hh" -//#include "marci_property_vector.hh" -#include "preflow_push.hh" - -using namespace lemon; - - -int main (int, char*[]) -{ - - 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); - - - - std::cout << "preflow-push algorithm test..." << std::endl; - - - preflow_push preflow_push_test(graph, s, t, length); - cout << preflow_push_test.run()<