Changeset 970:d216e1c8b3fa in lemon-1.2 for test/hao_orlin_test.cc
- Timestamp:
- 11/28/12 11:54:43 (12 years ago)
- Branch:
- default
- Parents:
- 965:00f8d9f9920d (diff), 969:7e368d9b67f7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
test/hao_orlin_test.cc
r877 r970 67 67 CutMap cut; 68 68 Value v; 69 ignore_unused_variable_warning(v); 69 70 70 71 HaoOrlin<Digraph, CapMap> ho_test(g, cap); -
test/hao_orlin_test.cc
r969 r970 3 3 * This file is a part of LEMON, a generic C++ optimization library. 4 4 * 5 * Copyright (C) 2003-20 095 * Copyright (C) 2003-2010 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 85 85 86 86 template <typename Graph, typename CapMap, typename CutMap> 87 typename CapMap::Value 87 typename CapMap::Value 88 88 cutValue(const Graph& graph, const CapMap& cap, const CutMap& cut) 89 89 { … … 112 112 ho.run(); 113 113 ho.minCutMap(cut); 114 114 115 115 check(ho.minCutValue() == 1, "Wrong cut value"); 116 116 check(ho.minCutValue() == cutValue(graph, cap1, cut), "Wrong cut value"); … … 128 128 ho.run(); 129 129 ho.minCutMap(cut); 130 130 131 131 check(ho.minCutValue() == 1, "Wrong cut value"); 132 132 check(ho.minCutValue() == cutValue(graph, cap3, cut), "Wrong cut value"); 133 133 } 134 134 135 135 typedef Undirector<SmartDigraph> UGraph; 136 136 UGraph ugraph(graph); 137 137 138 138 { 139 139 HaoOrlin<UGraph, SmartDigraph::ArcMap<int> > ho(ugraph, cap1); 140 140 ho.run(); 141 141 ho.minCutMap(cut); 142 142 143 143 check(ho.minCutValue() == 2, "Wrong cut value"); 144 144 check(ho.minCutValue() == cutValue(ugraph, cap1, cut), "Wrong cut value"); … … 148 148 ho.run(); 149 149 ho.minCutMap(cut); 150 150 151 151 check(ho.minCutValue() == 5, "Wrong cut value"); 152 152 check(ho.minCutValue() == cutValue(ugraph, cap2, cut), "Wrong cut value"); … … 156 156 ho.run(); 157 157 ho.minCutMap(cut); 158 158 159 159 check(ho.minCutValue() == 5, "Wrong cut value"); 160 160 check(ho.minCutValue() == cutValue(ugraph, cap3, cut), "Wrong cut value");
Note: See TracChangeset
for help on using the changeset viewer.