# HG changeset patch # User klao # Date 1077562936 0 # Node ID 7d7dc3fab826172e1f25efbbf76d4754e13b8405 # Parent 8d24100ad4085df2eb4b7088d5daf64fbce2c91d 4.4.1-es ledahoz a demo atalakitva diff -r 8d24100ad408 -r 7d7dc3fab826 src/work/marci/makefile --- a/src/work/marci/makefile Mon Feb 23 17:33:50 2004 +0000 +++ b/src/work/marci/makefile Mon Feb 23 19:02:16 2004 +0000 @@ -1,7 +1,8 @@ CXX3 = g++-3.0 CXX2 = g++-2.95 +CXX3.3 = g++ CXXFLAGS = -W -Wall -ansi -pedantic -LEDAROOT = /ledasrc/LEDA-4.1 +LEDAROOT ?= /ledasrc/LEDA-4.1 BINARIES = edmonds_karp_demo edmonds_karp_demo_alpar preflow_demo_leda preflow_demo_boost edmonds_karp_demo_boost preflow_demo_jacint preflow_demo_athos @@ -24,6 +25,9 @@ preflow_demo_leda: $(CXX2) -W -Wall -O3 -DLEDA_PREFIX -I. -I$(LEDAROOT)/incl -L$(LEDAROOT) -o preflow_demo_leda preflow_demo_leda.cc -lP -lm -lL -lG +preflow_demo_leda_uj: + $(CXX3.3) -Wall -O3 -I$(LEDAROOT)/incl -I. -L$(LEDAROOT) -o preflow_demo_leda_uj preflow_demo_leda_uj.cc -lG -lL -lm + preflow_demo_boost: $(CXX2) -ftemplate-depth-30 -O3 -I. -I/home/marci/boost -o preflow_demo_boost preflow_demo_boost.cc diff -r 8d24100ad408 -r 7d7dc3fab826 src/work/marci/preflow_demo_leda_uj.cc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/work/marci/preflow_demo_leda_uj.cc Mon Feb 23 19:02:16 2004 +0000 @@ -0,0 +1,37 @@ +#include +#include + +#include +#include +#include + +#if defined(LEDA_NAMESPACE) +using namespace leda; +#endif + +using namespace std; + +#include + +// Use a DIMACS max flow file as stdin. +// read_dimacs_demo_leda < dimacs_max_flow_file +int main() +{ + GRAPH G; + leda_node s,t; + leda_edge_array cap; + Read_Dimacs_MF(cin,G,s,t,cap); + + leda_edge_array flow(G); + + std::cout << "preflow demo (LEDA)..." << std::endl; + double pre_time=currTime(); + int flow_value = MAX_FLOW(G,s,t,cap,flow); + double post_time=currTime(); + //std::cout << "maximum flow: "<< std::endl; + //std::cout<