Changeset 376:5c12f3515452 in lemon-0.x for src/work/marci
- Timestamp:
- 04/22/04 18:07:17 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@506
- Location:
- src/work/marci
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/work/marci/edmonds_karp_demo.cc
r333 r376 10 10 //#include <graph_wrapper.h> 11 11 #include <preflow.h> 12 #include <preflowproba.h> 12 13 #include <for_each_macros.h> 13 14 … … 71 72 Graph::EdgeMap<int> flow(G); //0 flow 72 73 Preflow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 73 pre_flow_test(G, s, t, cap, flow); 74 pre_flow_test(G, s, t, cap, flow, true); 75 PreflowProba<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 76 pre_flow_proba(G, s, t, cap, flow, true, true); 74 77 MaxFlow<Graph, int, Graph::EdgeMap<int>, Graph::EdgeMap<int> > 75 78 max_flow_test(G, s, t, cap, flow); … … 79 82 ts.reset(); 80 83 pre_flow_test.run(); 84 std::cout << "elapsed time: " << ts << std::endl; 85 std::cout << "flow value: "<< pre_flow_test.flowValue() << std::endl; 86 } 87 88 { 89 std::cout << "wrapped preflow ..." << std::endl; 90 FOR_EACH_LOC(Graph::EdgeIt, e, G) flow.set(e, 0); 91 ts.reset(); 92 pre_flow_proba.run(); 81 93 std::cout << "elapsed time: " << ts << std::endl; 82 94 std::cout << "flow value: "<< pre_flow_test.flowValue() << std::endl; -
src/work/marci/graph_wrapper.h
r371 r376 696 696 Node bNode(OutEdgeIt e) const { 697 697 return ((e.forward) ? graph->bNode(e.out) : graph->bNode(e.in)); } 698 699 Node aNode(InEdgeIt e) const { 700 return ((e.forward) ? graph->aNode(e.in) : graph->aNode(e.out)); } 701 Node bNode(InEdgeIt e) const { 702 return ((e.forward) ? graph->bNode(e.in) : graph->bNode(e.out)); } 698 703 699 704 // int nodeNum() const { return graph->nodeNum(); } -
src/work/marci/makefile
r368 r376 7 7 INCLUDEDIRS ?= -I../../include -I.. -I../{marci,jacint,alpar,klao,akos,athos} -I$(BOOSTROOT) 8 8 LEDAINCLUDE ?= -I$(LEDAROOT)/incl 9 CXXFLAGS = -g -O -W -Wall $(INCLUDEDIRS) -ansi -pedantic -ftemplate-depth-309 CXXFLAGS = -g -O3 -W -Wall $(INCLUDEDIRS) -ansi -pedantic -ftemplate-depth-30 10 10 11 11 LEDABINARIES = leda_graph_demo leda_bfs_dfs max_bipartite_matching_demo … … 42 42 $(CXX3) -Wall -O -L$(LEDAROOT) -o leda_bfs_dfs leda_bfs_dfs.o -lG -lL -lm 43 43 44 edmonds_karp_demo:45 $(CXX3) $(CXXFLAGS) -o edmonds_karp_demo edmonds_karp_demo.cc44 #edmonds_karp_demo: 45 # $(CXX3) $(CXXFLAGS) -o edmonds_karp_demo edmonds_karp_demo.cc 46 46 # $(CXX3) $(CXXFLAGS) -pg -o edmonds_karp_demo_prof edmonds_karp_demo.cc 47 47
Note: See TracChangeset
for help on using the changeset viewer.