[Lemon-commits] [lemon_svn] klao: r170 - hugo/trunk/src/work/marci

Lemon SVN svn at lemon.cs.elte.hu
Mon Nov 6 20:37:54 CET 2006


Author: klao
Date: Mon Feb 23 20:02:16 2004
New Revision: 170

Added:
   hugo/trunk/src/work/marci/preflow_demo_leda_uj.cc
Modified:
   hugo/trunk/src/work/marci/makefile

Log:
4.4.1-es ledahoz a demo atalakitva


Modified: hugo/trunk/src/work/marci/makefile
==============================================================================
--- hugo/trunk/src/work/marci/makefile	(original)
+++ hugo/trunk/src/work/marci/makefile	Mon Feb 23 20:02:16 2004
@@ -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
 

Added: hugo/trunk/src/work/marci/preflow_demo_leda_uj.cc
==============================================================================
--- (empty file)
+++ hugo/trunk/src/work/marci/preflow_demo_leda_uj.cc	Mon Feb 23 20:02:16 2004
@@ -0,0 +1,37 @@
+#include <iostream>
+#include <fstream>
+
+#include <LEDA/graph.h>
+#include <LEDA/graph_alg.h>
+#include <LEDA/dimacs.h>
+
+#if defined(LEDA_NAMESPACE)
+using namespace leda;
+#endif
+
+using namespace std;
+
+#include <time_measure.h>
+
+// Use a DIMACS max flow file as stdin.
+// read_dimacs_demo_leda < dimacs_max_flow_file
+int main() 
+{
+  GRAPH<int,int> G;
+  leda_node s,t;
+  leda_edge_array<int> cap;
+  Read_Dimacs_MF(cin,G,s,t,cap);
+ 
+  leda_edge_array<int> 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<<std::endl;
+  std::cout << "elapsed time: " << post_time-pre_time << " sec"<< std::endl; 
+  std::cout << "flow value: "<< flow_value << std::endl;
+
+  return 0;
+}



More information about the Lemon-commits mailing list