gravatar
alpar (Alpar Juttner)
alpar@cs.elte.hu
Merge #419 to branch 1.2
0 3 0
merge 1.2
2 files changed with 49 insertions and 3 deletions:
↑ Collapse diff ↑
Ignore white space 768 line context
1 1
SET(COIN_ROOT_DIR "" CACHE PATH "COIN root directory")
2 2

	
3 3
FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h
4 4
  HINTS ${COIN_ROOT_DIR}/include
5 5
)
6 6
FIND_LIBRARY(COIN_CBC_LIBRARY
7 7
  NAMES Cbc libCbc
8
  HINTS ${COIN_ROOT_DIR}/lib/coin
8 9
  HINTS ${COIN_ROOT_DIR}/lib
9 10
)
10 11
FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
11 12
  NAMES CbcSolver libCbcSolver
13
  HINTS ${COIN_ROOT_DIR}/lib/coin
12 14
  HINTS ${COIN_ROOT_DIR}/lib
13 15
)
14 16
FIND_LIBRARY(COIN_CGL_LIBRARY
15 17
  NAMES Cgl libCgl
18
  HINTS ${COIN_ROOT_DIR}/lib/coin
16 19
  HINTS ${COIN_ROOT_DIR}/lib
17 20
)
18 21
FIND_LIBRARY(COIN_CLP_LIBRARY
19 22
  NAMES Clp libClp
23
  HINTS ${COIN_ROOT_DIR}/lib/coin
20 24
  HINTS ${COIN_ROOT_DIR}/lib
21 25
)
22 26
FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
23 27
  NAMES CoinUtils libCoinUtils
28
  HINTS ${COIN_ROOT_DIR}/lib/coin
24 29
  HINTS ${COIN_ROOT_DIR}/lib
25 30
)
26 31
FIND_LIBRARY(COIN_OSI_LIBRARY
27 32
  NAMES Osi libOsi
33
  HINTS ${COIN_ROOT_DIR}/lib/coin
28 34
  HINTS ${COIN_ROOT_DIR}/lib
29 35
)
30 36
FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
31 37
  NAMES OsiCbc libOsiCbc
38
  HINTS ${COIN_ROOT_DIR}/lib/coin
32 39
  HINTS ${COIN_ROOT_DIR}/lib
33 40
)
34 41
FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
35 42
  NAMES OsiClp libOsiClp
43
  HINTS ${COIN_ROOT_DIR}/lib/coin
36 44
  HINTS ${COIN_ROOT_DIR}/lib
37 45
)
38 46
FIND_LIBRARY(COIN_OSI_VOL_LIBRARY
39 47
  NAMES OsiVol libOsiVol
48
  HINTS ${COIN_ROOT_DIR}/lib/coin
40 49
  HINTS ${COIN_ROOT_DIR}/lib
41 50
)
42 51
FIND_LIBRARY(COIN_VOL_LIBRARY
43 52
  NAMES Vol libVol
53
  HINTS ${COIN_ROOT_DIR}/lib/coin
44 54
  HINTS ${COIN_ROOT_DIR}/lib
45 55
)
46 56

	
47 57
INCLUDE(FindPackageHandleStandardArgs)
48 58
FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
49 59
  COIN_INCLUDE_DIR
50 60
  COIN_CBC_LIBRARY
51 61
  COIN_CBC_SOLVER_LIBRARY
52 62
  COIN_CGL_LIBRARY
53 63
  COIN_CLP_LIBRARY
54 64
  COIN_COIN_UTILS_LIBRARY
55 65
  COIN_OSI_LIBRARY
56 66
  COIN_OSI_CBC_LIBRARY
57 67
  COIN_OSI_CLP_LIBRARY
58
  COIN_OSI_VOL_LIBRARY
59
  COIN_VOL_LIBRARY
68
  # COIN_OSI_VOL_LIBRARY
69
  # COIN_VOL_LIBRARY
60 70
)
61 71

	
62 72
IF(COIN_FOUND)
63 73
  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
64
  SET(COIN_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_OSI_VOL_LIBRARY};${COIN_VOL_LIBRARY}")
74
  SET(COIN_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY}")
65 75
  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
66 76
  SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
67 77
ENDIF(COIN_FOUND)
68 78

	
69 79
MARK_AS_ADVANCED(
70 80
  COIN_INCLUDE_DIR
71 81
  COIN_CBC_LIBRARY
72 82
  COIN_CBC_SOLVER_LIBRARY
73 83
  COIN_CGL_LIBRARY
74 84
  COIN_CLP_LIBRARY
75 85
  COIN_COIN_UTILS_LIBRARY
76 86
  COIN_OSI_LIBRARY
77 87
  COIN_OSI_CBC_LIBRARY
78 88
  COIN_OSI_CLP_LIBRARY
79 89
  COIN_OSI_VOL_LIBRARY
80 90
  COIN_VOL_LIBRARY
81 91
)
82 92

	
83 93
IF(COIN_FOUND)
84 94
  SET(LEMON_HAVE_LP TRUE)
85 95
  SET(LEMON_HAVE_MIP TRUE)
86 96
  SET(LEMON_HAVE_CLP TRUE)
87 97
  SET(LEMON_HAVE_CBC TRUE)
88 98
ENDIF(COIN_FOUND)
Ignore white space 6 line context
1 1
INCLUDE_DIRECTORIES(
2 2
  ${PROJECT_SOURCE_DIR}
3 3
  ${PROJECT_BINARY_DIR}
4 4
)
5 5

	
6 6
LINK_DIRECTORIES(
7 7
  ${PROJECT_BINARY_DIR}/lemon
8 8
)
9 9

	
10 10
SET(TEST_WITH_VALGRIND "NO" CACHE STRING
11 11
  "Run the test with valgrind (YES/NO).")
12 12
SET(VALGRIND_FLAGS "" CACHE STRING "Valgrind flags used by the tests.")
13 13

	
14 14
SET(TESTS
15 15
  adaptors_test
16 16
  bellman_ford_test
17 17
  bfs_test
18 18
  circulation_test
19 19
  connectivity_test
20 20
  counter_test
21 21
  dfs_test
22 22
  digraph_test
23 23
  dijkstra_test
24 24
  dim_test
25 25
  edge_set_test
26 26
  error_test
27 27
  euler_test
28 28
  fractional_matching_test
29 29
  gomory_hu_test
30 30
  graph_copy_test
31 31
  graph_test
32 32
  graph_utils_test
33 33
  hao_orlin_test
34 34
  heap_test
35 35
  kruskal_test
36 36
  maps_test
37 37
  matching_test
38 38
  min_cost_arborescence_test
39 39
  min_cost_flow_test
40 40
  min_mean_cycle_test
41 41
  path_test
42 42
  planarity_test
43 43
  preflow_test
44 44
  radix_sort_test
45 45
  random_test
46 46
  suurballe_test
47 47
  time_measure_test
48 48
  unionfind_test
49 49
)
50 50

	
51 51
IF(LEMON_HAVE_LP)
52 52
  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
53 53
    ADD_EXECUTABLE(lp_test lp_test.cc)
54 54
  ELSE()
55 55
    ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc)
56 56
  ENDIF()
57 57

	
58 58
  SET(LP_TEST_LIBS lemon)
59 59

	
60 60
  IF(LEMON_HAVE_GLPK)
61 61
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
62 62
  ENDIF()
63 63
  IF(LEMON_HAVE_CPLEX)
64 64
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
65 65
  ENDIF()
66 66
  IF(LEMON_HAVE_CLP)
67 67
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
68 68
  ENDIF()
69 69

	
70 70
  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
71 71
  ADD_TEST(lp_test lp_test)
72
  ADD_DEPENDENCIES(check lp_test)
72 73

	
73 74
  IF(WIN32 AND LEMON_HAVE_GLPK)
74 75
    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
75 76
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
76 77
    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
77 78
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
78 79
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
79 80
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
80 81
    )
81 82
  ENDIF()
82 83

	
83 84
  IF(WIN32 AND LEMON_HAVE_CPLEX)
84 85
    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
85 86
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
86 87
    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
87 88
      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
88 89
    )
89 90
  ENDIF()
90 91
ENDIF()
91 92

	
92 93
IF(LEMON_HAVE_MIP)
93 94
  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
94 95
    ADD_EXECUTABLE(mip_test mip_test.cc)
95 96
  ELSE()
96 97
    ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc)
97 98
  ENDIF()
98 99

	
99 100
  SET(MIP_TEST_LIBS lemon)
100 101

	
101 102
  IF(LEMON_HAVE_GLPK)
102 103
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
103 104
  ENDIF()
104 105
  IF(LEMON_HAVE_CPLEX)
105 106
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
106 107
  ENDIF()
107 108
  IF(LEMON_HAVE_CBC)
108 109
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
109 110
  ENDIF()
110 111

	
111 112
  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
112 113
  ADD_TEST(mip_test mip_test)
114
  ADD_DEPENDENCIES(check mip_test)
113 115

	
114 116
  IF(WIN32 AND LEMON_HAVE_GLPK)
115 117
    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
116 118
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
117 119
    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
118 120
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
119 121
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
120 122
      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
121 123
    )
122 124
  ENDIF()
123 125

	
124 126
  IF(WIN32 AND LEMON_HAVE_CPLEX)
125 127
    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
126 128
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
127 129
    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
128 130
      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
129 131
    )
130 132
  ENDIF()
131 133
ENDIF()
132 134

	
133 135
FOREACH(TEST_NAME ${TESTS})
134 136
  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
135 137
    ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
136 138
  ELSE()
137 139
    ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc)
138 140
  ENDIF()
139 141
  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
140 142
    IF(TEST_WITH_VALGRIND)
141 143
      ADD_TEST(${TEST_NAME}
142 144
        valgrind --error-exitcode=1 ${VALGRIND_FLAGS}
143 145
        ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} )
144 146
    ELSE()
145 147
      ADD_TEST(${TEST_NAME} ${TEST_NAME})
146 148
    ENDIF()
147 149
  ADD_DEPENDENCIES(check ${TEST_NAME})
148 150
ENDFOREACH()
Ignore white space 6 line context
1 1
/* -*- mode: C++; indent-tabs-mode: nil; -*-
2 2
 *
3 3
 * This file is a part of LEMON, a generic C++ optimization library.
4 4
 *
5 5
 * Copyright (C) 2003-2009
6 6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
7 7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
8 8
 *
9 9
 * Permission to use, modify and distribute this software is granted
10 10
 * provided that this copyright notice appears in all copies. For
11 11
 * precise terms see the accompanying LICENSE file.
12 12
 *
13 13
 * This software is provided "AS IS" with no warranty of any kind,
14 14
 * express or implied, and with no claim as to its suitability for any
15 15
 * purpose.
16 16
 *
17 17
 */
18 18

	
19 19
#include <iostream>
20 20
#include <fstream>
21 21
#include <string>
22 22
#include <vector>
23 23

	
24 24
#include <lemon/concept_check.h>
25 25
#include <lemon/concepts/heap.h>
26 26

	
27 27
#include <lemon/smart_graph.h>
28 28
#include <lemon/lgf_reader.h>
29 29
#include <lemon/dijkstra.h>
30 30
#include <lemon/maps.h>
31 31

	
32 32
#include <lemon/bin_heap.h>
33 33
#include <lemon/quad_heap.h>
34 34
#include <lemon/dheap.h>
35 35
#include <lemon/fib_heap.h>
36 36
#include <lemon/pairing_heap.h>
37 37
#include <lemon/radix_heap.h>
38 38
#include <lemon/binomial_heap.h>
39 39
#include <lemon/bucket_heap.h>
40 40

	
41 41
#include "test_tools.h"
42 42

	
43 43
using namespace lemon;
44 44
using namespace lemon::concepts;
45 45

	
46 46
typedef ListDigraph Digraph;
47 47
DIGRAPH_TYPEDEFS(Digraph);
48 48

	
49 49
char test_lgf[] =
50 50
  "@nodes\n"
51 51
  "label\n"
52 52
  "0\n"
53 53
  "1\n"
54 54
  "2\n"
55 55
  "3\n"
56 56
  "4\n"
57 57
  "5\n"
58 58
  "6\n"
59 59
  "7\n"
60 60
  "8\n"
61 61
  "9\n"
62 62
  "@arcs\n"
63 63
  "                label   capacity\n"
64 64
  "0       5       0       94\n"
65 65
  "3       9       1       11\n"
66 66
  "8       7       2       83\n"
67 67
  "1       2       3       94\n"
68 68
  "5       7       4       35\n"
69 69
  "7       4       5       84\n"
70 70
  "9       5       6       38\n"
71 71
  "0       4       7       96\n"
72 72
  "6       7       8       6\n"
73 73
  "3       1       9       27\n"
74 74
  "5       2       10      77\n"
75 75
  "5       6       11      69\n"
76 76
  "6       5       12      41\n"
77 77
  "4       6       13      70\n"
78 78
  "3       2       14      45\n"
79 79
  "7       9       15      93\n"
80 80
  "5       9       16      50\n"
81 81
  "9       0       17      94\n"
82 82
  "9       6       18      67\n"
83 83
  "0       9       19      86\n"
84 84
  "@attributes\n"
85 85
  "source 3\n";
86 86

	
87 87
int test_seq[] = { 2, 28, 19, 27, 33, 25, 13, 41, 10, 26,  1,  9,  4, 34};
88 88
int test_inc[] = {20, 28, 34, 16,  0, 46, 44,  0, 42, 32, 14,  8,  6, 37};
89 89

	
90 90
int test_len = sizeof(test_seq) / sizeof(test_seq[0]);
91 91

	
92 92
template <typename Heap>
93 93
void heapSortTest() {
94 94
  RangeMap<int> map(test_len, -1);
95 95
  Heap heap(map);
96 96

	
97 97
  std::vector<int> v(test_len);
98 98
  for (int i = 0; i < test_len; ++i) {
99 99
    v[i] = test_seq[i];
100 100
    heap.push(i, v[i]);
101 101
  }
102 102
  std::sort(v.begin(), v.end());
103 103
  for (int i = 0; i < test_len; ++i) {
104 104
    check(v[i] == heap.prio(), "Wrong order in heap sort.");
105 105
    heap.pop();
106 106
  }
107 107
}
108 108

	
109 109
template <typename Heap>
110 110
void heapIncreaseTest() {
111 111
  RangeMap<int> map(test_len, -1);
112 112

	
113 113
  Heap heap(map);
114 114

	
115 115
  std::vector<int> v(test_len);
116 116
  for (int i = 0; i < test_len; ++i) {
117 117
    v[i] = test_seq[i];
118 118
    heap.push(i, v[i]);
119 119
  }
120 120
  for (int i = 0; i < test_len; ++i) {
121 121
    v[i] += test_inc[i];
122 122
    heap.increase(i, v[i]);
123 123
  }
124 124
  std::sort(v.begin(), v.end());
125 125
  for (int i = 0; i < test_len; ++i) {
126 126
    check(v[i] == heap.prio(), "Wrong order in heap increase test.");
127 127
    heap.pop();
128 128
  }
129 129
}
130 130

	
131 131
template <typename Heap>
132 132
void dijkstraHeapTest(const Digraph& digraph, const IntArcMap& length,
133 133
                      Node source) {
134 134

	
135 135
  typename Dijkstra<Digraph, IntArcMap>::template SetStandardHeap<Heap>::
136 136
    Create dijkstra(digraph, length);
137 137

	
138 138
  dijkstra.run(source);
139 139

	
140 140
  for(ArcIt a(digraph); a != INVALID; ++a) {
141 141
    Node s = digraph.source(a);
142 142
    Node t = digraph.target(a);
143 143
    if (dijkstra.reached(s)) {
144 144
      check( dijkstra.dist(t) - dijkstra.dist(s) <= length[a],
145 145
             "Error in shortest path tree.");
146 146
    }
147 147
  }
148 148

	
149 149
  for(NodeIt n(digraph); n != INVALID; ++n) {
150 150
    if ( dijkstra.reached(n) && dijkstra.predArc(n) != INVALID ) {
151 151
      Arc a = dijkstra.predArc(n);
152 152
      Node s = digraph.source(a);
153 153
      check( dijkstra.dist(n) - dijkstra.dist(s) == length[a],
154 154
             "Error in shortest path tree.");
155 155
    }
156 156
  }
157 157

	
158 158
}
159 159

	
160 160
int main() {
161 161

	
162 162
  typedef int Item;
163 163
  typedef int Prio;
164 164
  typedef RangeMap<int> ItemIntMap;
165 165

	
166 166
  Digraph digraph;
167 167
  IntArcMap length(digraph);
168 168
  Node source;
169 169

	
170 170
  std::istringstream input(test_lgf);
171 171
  digraphReader(digraph, input).
172 172
    arcMap("capacity", length).
173 173
    node("source", source).
174 174
    run();
175 175

	
176 176
  // BinHeap
177 177
  {
178 178
    typedef BinHeap<Prio, ItemIntMap> IntHeap;
179 179
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
180 180
    heapSortTest<IntHeap>();
181 181
    heapIncreaseTest<IntHeap>();
182 182

	
183 183
    typedef BinHeap<Prio, IntNodeMap > NodeHeap;
184 184
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
185 185
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
186 186
  }
187 187

	
188 188
  // QuadHeap
189 189
  {
190 190
    typedef QuadHeap<Prio, ItemIntMap> IntHeap;
191 191
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
192 192
    heapSortTest<IntHeap>();
193 193
    heapIncreaseTest<IntHeap>();
194 194

	
195 195
    typedef QuadHeap<Prio, IntNodeMap > NodeHeap;
196 196
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
197 197
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
198 198
  }
199 199

	
200 200
  // DHeap
201 201
  {
202 202
    typedef DHeap<Prio, ItemIntMap> IntHeap;
203 203
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
204 204
    heapSortTest<IntHeap>();
205 205
    heapIncreaseTest<IntHeap>();
206 206

	
207 207
    typedef DHeap<Prio, IntNodeMap > NodeHeap;
208 208
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
209 209
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
210 210
  }
211 211

	
212 212
  // FibHeap
213 213
  {
214 214
    typedef FibHeap<Prio, ItemIntMap> IntHeap;
215 215
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
216 216
    heapSortTest<IntHeap>();
217 217
    heapIncreaseTest<IntHeap>();
218 218

	
219 219
    typedef FibHeap<Prio, IntNodeMap > NodeHeap;
220 220
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
221 221
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
222 222
  }
223 223

	
224 224
  // PairingHeap
225 225
  {
226 226
    typedef PairingHeap<Prio, ItemIntMap> IntHeap;
227 227
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
228 228
    heapSortTest<IntHeap>();
229 229
    heapIncreaseTest<IntHeap>();
230 230

	
231 231
    typedef PairingHeap<Prio, IntNodeMap > NodeHeap;
232 232
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
233 233
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
234 234
  }
235 235

	
236 236
  // RadixHeap
237 237
  {
238 238
    typedef RadixHeap<ItemIntMap> IntHeap;
239 239
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
240 240
    heapSortTest<IntHeap>();
241 241
    heapIncreaseTest<IntHeap>();
242 242

	
243 243
    typedef RadixHeap<IntNodeMap > NodeHeap;
244 244
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
245 245
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
246 246
  }
247 247

	
248 248
  // BinomialHeap
249 249
  {
250 250
    typedef BinomialHeap<Prio, ItemIntMap> IntHeap;
251 251
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
252 252
    heapSortTest<IntHeap>();
253 253
    heapIncreaseTest<IntHeap>();
254 254

	
255 255
    typedef BinomialHeap<Prio, IntNodeMap > NodeHeap;
256 256
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
257 257
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
258 258
  }
259 259

	
260 260
  // BucketHeap, SimpleBucketHeap
261 261
  {
262 262
    typedef BucketHeap<ItemIntMap> IntHeap;
263 263
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
264 264
    heapSortTest<IntHeap>();
265 265
    heapIncreaseTest<IntHeap>();
266 266

	
267 267
    typedef BucketHeap<IntNodeMap > NodeHeap;
268 268
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
269 269
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
270 270

	
271 271
    typedef SimpleBucketHeap<ItemIntMap> SimpleIntHeap;
272 272
    heapSortTest<SimpleIntHeap>();
273 273
  }
274 274

	
275
  {
276
    typedef FibHeap<Prio, ItemIntMap> IntHeap;
277
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
278
    heapSortTest<IntHeap>();
279
    heapIncreaseTest<IntHeap>();
280

	
281
    typedef FibHeap<Prio, IntNodeMap > NodeHeap;
282
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
283
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
284
  }
285

	
286
  {
287
    typedef RadixHeap<ItemIntMap> IntHeap;
288
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
289
    heapSortTest<IntHeap>();
290
    heapIncreaseTest<IntHeap>();
291

	
292
    typedef RadixHeap<IntNodeMap > NodeHeap;
293
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
294
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
295
  }
296

	
297
  {
298
    typedef BucketHeap<ItemIntMap> IntHeap;
299
    checkConcept<Heap<Prio, ItemIntMap>, IntHeap>();
300
    heapSortTest<IntHeap>();
301
    heapIncreaseTest<IntHeap>();
302

	
303
    typedef BucketHeap<IntNodeMap > NodeHeap;
304
    checkConcept<Heap<Prio, IntNodeMap >, NodeHeap>();
305
    dijkstraHeapTest<NodeHeap>(digraph, length, source);
306
  }
307

	
308

	
275 309
  return 0;
276 310
}
0 comments (0 inline)