Changeset 376:5c12f3515452 in lemon0.x
 Timestamp:
 04/22/04 18:07:17 (17 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@506
 Location:
 src/work
 Files:

 4 edited
Legend:
 Unmodified
 Added
 Removed

src/work/jacint/preflowproba.h
r374 r376 41 41 */ 42 42 43 #ifndef HUGO_PREFLOW_ H44 #define HUGO_PREFLOW_ H43 #ifndef HUGO_PREFLOW_PROBA_H 44 #define HUGO_PREFLOW_PROBA_H 45 45 46 46 #define H0 20 … … 56 56 typename CapMap=typename Graph::EdgeMap<T>, 57 57 typename FlowMap=typename Graph::EdgeMap<T> > 58 class Preflow {58 class PreflowProba { 59 59 60 60 typedef typename Graph::Node Node; … … 79 79 80 80 public: 81 Preflow (Graph& _G, Node _s, Node _t, CapMap& _capacity,81 PreflowProba(Graph& _G, Node _s, Node _t, CapMap& _capacity, 82 82 FlowMap& _flow, bool _constzero, bool _res ) : 83 83 G(_G), s(_s), t(_t), capacity(_capacity), flow(_flow), constzero(_constzero), res(_res) {} … … 683 683 } //namespace hugo 684 684 685 #endif //PREFLOW_ H686 687 688 689 685 #endif //PREFLOW_PROBA_H 686 687 688 689 
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 ftemplatedepth309 CXXFLAGS = g O3 W Wall $(INCLUDEDIRS) ansi pedantic ftemplatedepth30 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.