0
3
2
| 1 |
/* -*- C++ -*- |
|
| 2 |
* |
|
| 3 |
* This file is a part of LEMON, a generic C++ optimization library |
|
| 4 |
* |
|
| 5 |
* Copyright (C) 2003-2008 |
|
| 6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport |
|
| 7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES). |
|
| 8 |
* |
|
| 9 |
* Permission to use, modify and distribute this software is granted |
|
| 10 |
* provided that this copyright notice appears in all copies. For |
|
| 11 |
* precise terms see the accompanying LICENSE file. |
|
| 12 |
* |
|
| 13 |
* This software is provided "AS IS" with no warranty of any kind, |
|
| 14 |
* express or implied, and with no claim as to its suitability for any |
|
| 15 |
* purpose. |
|
| 16 |
* |
|
| 17 |
*/ |
|
| 18 |
|
|
| 19 |
#ifndef LEMON_GOMORY_HU_TREE_H |
|
| 20 |
#define LEMON_GOMORY_HU_TREE_H |
|
| 21 |
|
|
| 22 |
#include <limits> |
|
| 23 |
|
|
| 24 |
#include <lemon/core.h> |
|
| 25 |
#include <lemon/preflow.h> |
|
| 26 |
#include <lemon/concept_check.h> |
|
| 27 |
#include <lemon/concepts/maps.h> |
|
| 28 |
|
|
| 29 |
/// \ingroup min_cut |
|
| 30 |
/// \file |
|
| 31 |
/// \brief Gomory-Hu cut tree in graphs. |
|
| 32 |
|
|
| 33 |
namespace lemon {
|
|
| 34 |
|
|
| 35 |
/// \ingroup min_cut |
|
| 36 |
/// |
|
| 37 |
/// \brief Gomory-Hu cut tree algorithm |
|
| 38 |
/// |
|
| 39 |
/// The Gomory-Hu tree is a tree on the node set of a given graph, but it |
|
| 40 |
/// may contain edges which are not in the original graph. It has the |
|
| 41 |
/// property that the minimum capacity edge of the path between two nodes |
|
| 42 |
/// in this tree has the same weight as the minimum cut in the graph |
|
| 43 |
/// between these nodes. Moreover the components obtained by removing |
|
| 44 |
/// this edge from the tree determine the corresponding minimum cut. |
|
| 45 |
/// |
|
| 46 |
/// Therefore once this tree is computed, the minimum cut between any pair |
|
| 47 |
/// of nodes can easily be obtained. |
|
| 48 |
/// |
|
| 49 |
/// The algorithm calculates \e n-1 distinct minimum cuts (currently with |
|
| 50 |
/// the \ref Preflow algorithm), therefore the algorithm has |
|
| 51 |
/// \f$(O(n^3\sqrt{e})\f$ overall time complexity. It calculates a
|
|
| 52 |
/// rooted Gomory-Hu tree, its structure and the weights can be obtained |
|
| 53 |
/// by \c predNode(), \c predValue() and \c rootDist(). |
|
| 54 |
/// |
|
| 55 |
/// The members \c minCutMap() and \c minCutValue() calculate |
|
| 56 |
/// the minimum cut and the minimum cut value between any two nodes |
|
| 57 |
/// in the graph. You can also list (iterate on) the nodes and the |
|
| 58 |
/// edges of the cuts using \c MinCutNodeIt and \c MinCutEdgeIt. |
|
| 59 |
/// |
|
| 60 |
/// \tparam GR The type of the undirected graph the algorithm runs on. |
|
| 61 |
/// \tparam CAP The type of the edge map describing the edge capacities. |
|
| 62 |
/// It is \ref concepts::Graph::EdgeMap "GR::EdgeMap<int>" by default. |
|
| 63 |
#ifdef DOXYGEN |
|
| 64 |
template <typename GR, |
|
| 65 |
typename CAP> |
|
| 66 |
#else |
|
| 67 |
template <typename GR, |
|
| 68 |
typename CAP = typename GR::template EdgeMap<int> > |
|
| 69 |
#endif |
|
| 70 |
class GomoryHu {
|
|
| 71 |
public: |
|
| 72 |
|
|
| 73 |
/// The graph type |
|
| 74 |
typedef GR Graph; |
|
| 75 |
/// The type of the edge capacity map |
|
| 76 |
typedef CAP Capacity; |
|
| 77 |
/// The value type of capacities |
|
| 78 |
typedef typename Capacity::Value Value; |
|
| 79 |
|
|
| 80 |
private: |
|
| 81 |
|
|
| 82 |
TEMPLATE_GRAPH_TYPEDEFS(Graph); |
|
| 83 |
|
|
| 84 |
const Graph& _graph; |
|
| 85 |
const Capacity& _capacity; |
|
| 86 |
|
|
| 87 |
Node _root; |
|
| 88 |
typename Graph::template NodeMap<Node>* _pred; |
|
| 89 |
typename Graph::template NodeMap<Value>* _weight; |
|
| 90 |
typename Graph::template NodeMap<int>* _order; |
|
| 91 |
|
|
| 92 |
void createStructures() {
|
|
| 93 |
if (!_pred) {
|
|
| 94 |
_pred = new typename Graph::template NodeMap<Node>(_graph); |
|
| 95 |
} |
|
| 96 |
if (!_weight) {
|
|
| 97 |
_weight = new typename Graph::template NodeMap<Value>(_graph); |
|
| 98 |
} |
|
| 99 |
if (!_order) {
|
|
| 100 |
_order = new typename Graph::template NodeMap<int>(_graph); |
|
| 101 |
} |
|
| 102 |
} |
|
| 103 |
|
|
| 104 |
void destroyStructures() {
|
|
| 105 |
if (_pred) {
|
|
| 106 |
delete _pred; |
|
| 107 |
} |
|
| 108 |
if (_weight) {
|
|
| 109 |
delete _weight; |
|
| 110 |
} |
|
| 111 |
if (_order) {
|
|
| 112 |
delete _order; |
|
| 113 |
} |
|
| 114 |
} |
|
| 115 |
|
|
| 116 |
public: |
|
| 117 |
|
|
| 118 |
/// \brief Constructor |
|
| 119 |
/// |
|
| 120 |
/// Constructor |
|
| 121 |
/// \param graph The undirected graph the algorithm runs on. |
|
| 122 |
/// \param capacity The edge capacity map. |
|
| 123 |
GomoryHu(const Graph& graph, const Capacity& capacity) |
|
| 124 |
: _graph(graph), _capacity(capacity), |
|
| 125 |
_pred(0), _weight(0), _order(0) |
|
| 126 |
{
|
|
| 127 |
checkConcept<concepts::ReadMap<Edge, Value>, Capacity>(); |
|
| 128 |
} |
|
| 129 |
|
|
| 130 |
|
|
| 131 |
/// \brief Destructor |
|
| 132 |
/// |
|
| 133 |
/// Destructor |
|
| 134 |
~GomoryHu() {
|
|
| 135 |
destroyStructures(); |
|
| 136 |
} |
|
| 137 |
|
|
| 138 |
private: |
|
| 139 |
|
|
| 140 |
// Initialize the internal data structures |
|
| 141 |
void init() {
|
|
| 142 |
createStructures(); |
|
| 143 |
|
|
| 144 |
_root = NodeIt(_graph); |
|
| 145 |
for (NodeIt n(_graph); n != INVALID; ++n) {
|
|
| 146 |
_pred->set(n, _root); |
|
| 147 |
_order->set(n, -1); |
|
| 148 |
} |
|
| 149 |
_pred->set(_root, INVALID); |
|
| 150 |
_weight->set(_root, std::numeric_limits<Value>::max()); |
|
| 151 |
} |
|
| 152 |
|
|
| 153 |
|
|
| 154 |
// Start the algorithm |
|
| 155 |
void start() {
|
|
| 156 |
Preflow<Graph, Capacity> fa(_graph, _capacity, _root, INVALID); |
|
| 157 |
|
|
| 158 |
for (NodeIt n(_graph); n != INVALID; ++n) {
|
|
| 159 |
if (n == _root) continue; |
|
| 160 |
|
|
| 161 |
Node pn = (*_pred)[n]; |
|
| 162 |
fa.source(n); |
|
| 163 |
fa.target(pn); |
|
| 164 |
|
|
| 165 |
fa.runMinCut(); |
|
| 166 |
|
|
| 167 |
_weight->set(n, fa.flowValue()); |
|
| 168 |
|
|
| 169 |
for (NodeIt nn(_graph); nn != INVALID; ++nn) {
|
|
| 170 |
if (nn != n && fa.minCut(nn) && (*_pred)[nn] == pn) {
|
|
| 171 |
_pred->set(nn, n); |
|
| 172 |
} |
|
| 173 |
} |
|
| 174 |
if ((*_pred)[pn] != INVALID && fa.minCut((*_pred)[pn])) {
|
|
| 175 |
_pred->set(n, (*_pred)[pn]); |
|
| 176 |
_pred->set(pn, n); |
|
| 177 |
_weight->set(n, (*_weight)[pn]); |
|
| 178 |
_weight->set(pn, fa.flowValue()); |
|
| 179 |
} |
|
| 180 |
} |
|
| 181 |
|
|
| 182 |
_order->set(_root, 0); |
|
| 183 |
int index = 1; |
|
| 184 |
|
|
| 185 |
for (NodeIt n(_graph); n != INVALID; ++n) {
|
|
| 186 |
std::vector<Node> st; |
|
| 187 |
Node nn = n; |
|
| 188 |
while ((*_order)[nn] == -1) {
|
|
| 189 |
st.push_back(nn); |
|
| 190 |
nn = (*_pred)[nn]; |
|
| 191 |
} |
|
| 192 |
while (!st.empty()) {
|
|
| 193 |
_order->set(st.back(), index++); |
|
| 194 |
st.pop_back(); |
|
| 195 |
} |
|
| 196 |
} |
|
| 197 |
} |
|
| 198 |
|
|
| 199 |
public: |
|
| 200 |
|
|
| 201 |
///\name Execution Control |
|
| 202 |
|
|
| 203 |
///@{
|
|
| 204 |
|
|
| 205 |
/// \brief Run the Gomory-Hu algorithm. |
|
| 206 |
/// |
|
| 207 |
/// This function runs the Gomory-Hu algorithm. |
|
| 208 |
void run() {
|
|
| 209 |
init(); |
|
| 210 |
start(); |
|
| 211 |
} |
|
| 212 |
|
|
| 213 |
/// @} |
|
| 214 |
|
|
| 215 |
///\name Query Functions |
|
| 216 |
///The results of the algorithm can be obtained using these |
|
| 217 |
///functions.\n |
|
| 218 |
///\ref run() "run()" should be called before using them.\n |
|
| 219 |
///See also \ref MinCutNodeIt and \ref MinCutEdgeIt. |
|
| 220 |
|
|
| 221 |
///@{
|
|
| 222 |
|
|
| 223 |
/// \brief Return the predecessor node in the Gomory-Hu tree. |
|
| 224 |
/// |
|
| 225 |
/// This function returns the predecessor node in the Gomory-Hu tree. |
|
| 226 |
/// If the node is |
|
| 227 |
/// the root of the Gomory-Hu tree, then it returns \c INVALID. |
|
| 228 |
Node predNode(const Node& node) {
|
|
| 229 |
return (*_pred)[node]; |
|
| 230 |
} |
|
| 231 |
|
|
| 232 |
/// \brief Return the distance from the root node in the Gomory-Hu tree. |
|
| 233 |
/// |
|
| 234 |
/// This function returns the distance of \c node from the root node |
|
| 235 |
/// in the Gomory-Hu tree. |
|
| 236 |
int rootDist(const Node& node) {
|
|
| 237 |
return (*_order)[node]; |
|
| 238 |
} |
|
| 239 |
|
|
| 240 |
/// \brief Return the weight of the predecessor edge in the |
|
| 241 |
/// Gomory-Hu tree. |
|
| 242 |
/// |
|
| 243 |
/// This function returns the weight of the predecessor edge in the |
|
| 244 |
/// Gomory-Hu tree. If the node is the root, the result is undefined. |
|
| 245 |
Value predValue(const Node& node) {
|
|
| 246 |
return (*_weight)[node]; |
|
| 247 |
} |
|
| 248 |
|
|
| 249 |
/// \brief Return the minimum cut value between two nodes |
|
| 250 |
/// |
|
| 251 |
/// This function returns the minimum cut value between two nodes. The |
|
| 252 |
/// algorithm finds the nearest common ancestor in the Gomory-Hu |
|
| 253 |
/// tree and calculates the minimum weight edge on the paths to |
|
| 254 |
/// the ancestor. |
|
| 255 |
Value minCutValue(const Node& s, const Node& t) const {
|
|
| 256 |
Node sn = s, tn = t; |
|
| 257 |
Value value = std::numeric_limits<Value>::max(); |
|
| 258 |
|
|
| 259 |
while (sn != tn) {
|
|
| 260 |
if ((*_order)[sn] < (*_order)[tn]) {
|
|
| 261 |
if ((*_weight)[tn] <= value) value = (*_weight)[tn]; |
|
| 262 |
tn = (*_pred)[tn]; |
|
| 263 |
} else {
|
|
| 264 |
if ((*_weight)[sn] <= value) value = (*_weight)[sn]; |
|
| 265 |
sn = (*_pred)[sn]; |
|
| 266 |
} |
|
| 267 |
} |
|
| 268 |
return value; |
|
| 269 |
} |
|
| 270 |
|
|
| 271 |
/// \brief Return the minimum cut between two nodes |
|
| 272 |
/// |
|
| 273 |
/// This function returns the minimum cut between the nodes \c s and \c t |
|
| 274 |
/// in the \c cutMap parameter by setting the nodes in the component of |
|
| 275 |
/// \c s to \c true and the other nodes to \c false. |
|
| 276 |
/// |
|
| 277 |
/// For higher level interfaces, see MinCutNodeIt and MinCutEdgeIt. |
|
| 278 |
template <typename CutMap> |
|
| 279 |
Value minCutMap(const Node& s, ///< The base node. |
|
| 280 |
const Node& t, |
|
| 281 |
///< The node you want to separate from node \c s. |
|
| 282 |
CutMap& cutMap |
|
| 283 |
///< The cut will be returned in this map. |
|
| 284 |
/// It must be a \c bool (or convertible) |
|
| 285 |
/// \ref concepts::ReadWriteMap "ReadWriteMap" |
|
| 286 |
/// on the graph nodes. |
|
| 287 |
) const {
|
|
| 288 |
Node sn = s, tn = t; |
|
| 289 |
bool s_root=false; |
|
| 290 |
Node rn = INVALID; |
|
| 291 |
Value value = std::numeric_limits<Value>::max(); |
|
| 292 |
|
|
| 293 |
while (sn != tn) {
|
|
| 294 |
if ((*_order)[sn] < (*_order)[tn]) {
|
|
| 295 |
if ((*_weight)[tn] <= value) {
|
|
| 296 |
rn = tn; |
|
| 297 |
s_root = false; |
|
| 298 |
value = (*_weight)[tn]; |
|
| 299 |
} |
|
| 300 |
tn = (*_pred)[tn]; |
|
| 301 |
} else {
|
|
| 302 |
if ((*_weight)[sn] <= value) {
|
|
| 303 |
rn = sn; |
|
| 304 |
s_root = true; |
|
| 305 |
value = (*_weight)[sn]; |
|
| 306 |
} |
|
| 307 |
sn = (*_pred)[sn]; |
|
| 308 |
} |
|
| 309 |
} |
|
| 310 |
|
|
| 311 |
typename Graph::template NodeMap<bool> reached(_graph, false); |
|
| 312 |
reached.set(_root, true); |
|
| 313 |
cutMap.set(_root, !s_root); |
|
| 314 |
reached.set(rn, true); |
|
| 315 |
cutMap.set(rn, s_root); |
|
| 316 |
|
|
| 317 |
std::vector<Node> st; |
|
| 318 |
for (NodeIt n(_graph); n != INVALID; ++n) {
|
|
| 319 |
st.clear(); |
|
| 320 |
Node nn = n; |
|
| 321 |
while (!reached[nn]) {
|
|
| 322 |
st.push_back(nn); |
|
| 323 |
nn = (*_pred)[nn]; |
|
| 324 |
} |
|
| 325 |
while (!st.empty()) {
|
|
| 326 |
cutMap.set(st.back(), cutMap[nn]); |
|
| 327 |
st.pop_back(); |
|
| 328 |
} |
|
| 329 |
} |
|
| 330 |
|
|
| 331 |
return value; |
|
| 332 |
} |
|
| 333 |
|
|
| 334 |
///@} |
|
| 335 |
|
|
| 336 |
friend class MinCutNodeIt; |
|
| 337 |
|
|
| 338 |
/// Iterate on the nodes of a minimum cut |
|
| 339 |
|
|
| 340 |
/// This iterator class lists the nodes of a minimum cut found by |
|
| 341 |
/// GomoryHu. Before using it, you must allocate a GomoryHu class, |
|
| 342 |
/// and call its \ref GomoryHu::run() "run()" method. |
|
| 343 |
/// |
|
| 344 |
/// This example counts the nodes in the minimum cut separating \c s from |
|
| 345 |
/// \c t. |
|
| 346 |
/// \code |
|
| 347 |
/// GomoruHu<Graph> gom(g, capacities); |
|
| 348 |
/// gom.run(); |
|
| 349 |
/// int cnt=0; |
|
| 350 |
/// for(GomoruHu<Graph>::MinCutNodeIt n(gom,s,t); n!=INVALID; ++n) ++cnt; |
|
| 351 |
/// \endcode |
|
| 352 |
class MinCutNodeIt |
|
| 353 |
{
|
|
| 354 |
bool _side; |
|
| 355 |
typename Graph::NodeIt _node_it; |
|
| 356 |
typename Graph::template NodeMap<bool> _cut; |
|
| 357 |
public: |
|
| 358 |
/// Constructor |
|
| 359 |
|
|
| 360 |
/// Constructor. |
|
| 361 |
/// |
|
| 362 |
MinCutNodeIt(GomoryHu const &gomory, |
|
| 363 |
///< The GomoryHu class. You must call its |
|
| 364 |
/// run() method |
|
| 365 |
/// before initializing this iterator. |
|
| 366 |
const Node& s, ///< The base node. |
|
| 367 |
const Node& t, |
|
| 368 |
///< The node you want to separate from node \c s. |
|
| 369 |
bool side=true |
|
| 370 |
///< If it is \c true (default) then the iterator lists |
|
| 371 |
/// the nodes of the component containing \c s, |
|
| 372 |
/// otherwise it lists the other component. |
|
| 373 |
/// \note As the minimum cut is not always unique, |
|
| 374 |
/// \code |
|
| 375 |
/// MinCutNodeIt(gomory, s, t, true); |
|
| 376 |
/// \endcode |
|
| 377 |
/// and |
|
| 378 |
/// \code |
|
| 379 |
/// MinCutNodeIt(gomory, t, s, false); |
|
| 380 |
/// \endcode |
|
| 381 |
/// does not necessarily give the same set of nodes. |
|
| 382 |
/// However it is ensured that |
|
| 383 |
/// \code |
|
| 384 |
/// MinCutNodeIt(gomory, s, t, true); |
|
| 385 |
/// \endcode |
|
| 386 |
/// and |
|
| 387 |
/// \code |
|
| 388 |
/// MinCutNodeIt(gomory, s, t, false); |
|
| 389 |
/// \endcode |
|
| 390 |
/// together list each node exactly once. |
|
| 391 |
) |
|
| 392 |
: _side(side), _cut(gomory._graph) |
|
| 393 |
{
|
|
| 394 |
gomory.minCutMap(s,t,_cut); |
|
| 395 |
for(_node_it=typename Graph::NodeIt(gomory._graph); |
|
| 396 |
_node_it!=INVALID && _cut[_node_it]!=_side; |
|
| 397 |
++_node_it) {}
|
|
| 398 |
} |
|
| 399 |
/// Conversion to \c Node |
|
| 400 |
|
|
| 401 |
/// Conversion to \c Node. |
|
| 402 |
/// |
|
| 403 |
operator typename Graph::Node() const |
|
| 404 |
{
|
|
| 405 |
return _node_it; |
|
| 406 |
} |
|
| 407 |
bool operator==(Invalid) { return _node_it==INVALID; }
|
|
| 408 |
bool operator!=(Invalid) { return _node_it!=INVALID; }
|
|
| 409 |
/// Next node |
|
| 410 |
|
|
| 411 |
/// Next node. |
|
| 412 |
/// |
|
| 413 |
MinCutNodeIt &operator++() |
|
| 414 |
{
|
|
| 415 |
for(++_node_it;_node_it!=INVALID&&_cut[_node_it]!=_side;++_node_it) {}
|
|
| 416 |
return *this; |
|
| 417 |
} |
|
| 418 |
/// Postfix incrementation |
|
| 419 |
|
|
| 420 |
/// Postfix incrementation. |
|
| 421 |
/// |
|
| 422 |
/// \warning This incrementation |
|
| 423 |
/// returns a \c Node, not a \c MinCutNodeIt, as one may |
|
| 424 |
/// expect. |
|
| 425 |
typename Graph::Node operator++(int) |
|
| 426 |
{
|
|
| 427 |
typename Graph::Node n=*this; |
|
| 428 |
++(*this); |
|
| 429 |
return n; |
|
| 430 |
} |
|
| 431 |
}; |
|
| 432 |
|
|
| 433 |
friend class MinCutEdgeIt; |
|
| 434 |
|
|
| 435 |
/// Iterate on the edges of a minimum cut |
|
| 436 |
|
|
| 437 |
/// This iterator class lists the edges of a minimum cut found by |
|
| 438 |
/// GomoryHu. Before using it, you must allocate a GomoryHu class, |
|
| 439 |
/// and call its \ref GomoryHu::run() "run()" method. |
|
| 440 |
/// |
|
| 441 |
/// This example computes the value of the minimum cut separating \c s from |
|
| 442 |
/// \c t. |
|
| 443 |
/// \code |
|
| 444 |
/// GomoruHu<Graph> gom(g, capacities); |
|
| 445 |
/// gom.run(); |
|
| 446 |
/// int value=0; |
|
| 447 |
/// for(GomoruHu<Graph>::MinCutEdgeIt e(gom,s,t); e!=INVALID; ++e) |
|
| 448 |
/// value+=capacities[e]; |
|
| 449 |
/// \endcode |
|
| 450 |
/// the result will be the same as it is returned by |
|
| 451 |
/// \ref GomoryHu::minCutValue() "gom.minCutValue(s,t)" |
|
| 452 |
class MinCutEdgeIt |
|
| 453 |
{
|
|
| 454 |
bool _side; |
|
| 455 |
const Graph &_graph; |
|
| 456 |
typename Graph::NodeIt _node_it; |
|
| 457 |
typename Graph::OutArcIt _arc_it; |
|
| 458 |
typename Graph::template NodeMap<bool> _cut; |
|
| 459 |
void step() |
|
| 460 |
{
|
|
| 461 |
++_arc_it; |
|
| 462 |
while(_node_it!=INVALID && _arc_it==INVALID) |
|
| 463 |
{
|
|
| 464 |
for(++_node_it;_node_it!=INVALID&&!_cut[_node_it];++_node_it) {}
|
|
| 465 |
if(_node_it!=INVALID) |
|
| 466 |
_arc_it=typename Graph::OutArcIt(_graph,_node_it); |
|
| 467 |
} |
|
| 468 |
} |
|
| 469 |
|
|
| 470 |
public: |
|
| 471 |
MinCutEdgeIt(GomoryHu const &gomory, |
|
| 472 |
///< The GomoryHu class. You must call its |
|
| 473 |
/// run() method |
|
| 474 |
/// before initializing this iterator. |
|
| 475 |
const Node& s, ///< The base node. |
|
| 476 |
const Node& t, |
|
| 477 |
///< The node you want to separate from node \c s. |
|
| 478 |
bool side=true |
|
| 479 |
///< If it is \c true (default) then the listed arcs |
|
| 480 |
/// will be oriented from the |
|
| 481 |
/// the nodes of the component containing \c s, |
|
| 482 |
/// otherwise they will be oriented in the opposite |
|
| 483 |
/// direction. |
|
| 484 |
) |
|
| 485 |
: _graph(gomory._graph), _cut(_graph) |
|
| 486 |
{
|
|
| 487 |
gomory.minCutMap(s,t,_cut); |
|
| 488 |
if(!side) |
|
| 489 |
for(typename Graph::NodeIt n(_graph);n!=INVALID;++n) |
|
| 490 |
_cut[n]=!_cut[n]; |
|
| 491 |
|
|
| 492 |
for(_node_it=typename Graph::NodeIt(_graph); |
|
| 493 |
_node_it!=INVALID && !_cut[_node_it]; |
|
| 494 |
++_node_it) {}
|
|
| 495 |
_arc_it = _node_it!=INVALID ? |
|
| 496 |
typename Graph::OutArcIt(_graph,_node_it) : INVALID; |
|
| 497 |
while(_node_it!=INVALID && _arc_it == INVALID) |
|
| 498 |
{
|
|
| 499 |
for(++_node_it; _node_it!=INVALID&&!_cut[_node_it]; ++_node_it) {}
|
|
| 500 |
if(_node_it!=INVALID) |
|
| 501 |
_arc_it= typename Graph::OutArcIt(_graph,_node_it); |
|
| 502 |
} |
|
| 503 |
while(_arc_it!=INVALID && _cut[_graph.target(_arc_it)]) step(); |
|
| 504 |
} |
|
| 505 |
/// Conversion to \c Arc |
|
| 506 |
|
|
| 507 |
/// Conversion to \c Arc. |
|
| 508 |
/// |
|
| 509 |
operator typename Graph::Arc() const |
|
| 510 |
{
|
|
| 511 |
return _arc_it; |
|
| 512 |
} |
|
| 513 |
/// Conversion to \c Edge |
|
| 514 |
|
|
| 515 |
/// Conversion to \c Edge. |
|
| 516 |
/// |
|
| 517 |
operator typename Graph::Edge() const |
|
| 518 |
{
|
|
| 519 |
return _arc_it; |
|
| 520 |
} |
|
| 521 |
bool operator==(Invalid) { return _node_it==INVALID; }
|
|
| 522 |
bool operator!=(Invalid) { return _node_it!=INVALID; }
|
|
| 523 |
/// Next edge |
|
| 524 |
|
|
| 525 |
/// Next edge. |
|
| 526 |
/// |
|
| 527 |
MinCutEdgeIt &operator++() |
|
| 528 |
{
|
|
| 529 |
step(); |
|
| 530 |
while(_arc_it!=INVALID && _cut[_graph.target(_arc_it)]) step(); |
|
| 531 |
return *this; |
|
| 532 |
} |
|
| 533 |
/// Postfix incrementation |
|
| 534 |
|
|
| 535 |
/// Postfix incrementation. |
|
| 536 |
/// |
|
| 537 |
/// \warning This incrementation |
|
| 538 |
/// returns an \c Arc, not a \c MinCutEdgeIt, as one may expect. |
|
| 539 |
typename Graph::Arc operator++(int) |
|
| 540 |
{
|
|
| 541 |
typename Graph::Arc e=*this; |
|
| 542 |
++(*this); |
|
| 543 |
return e; |
|
| 544 |
} |
|
| 545 |
}; |
|
| 546 |
|
|
| 547 |
}; |
|
| 548 |
|
|
| 549 |
} |
|
| 550 |
|
|
| 551 |
#endif |
| 1 |
#include <iostream> |
|
| 2 |
|
|
| 3 |
#include "test_tools.h" |
|
| 4 |
#include <lemon/smart_graph.h> |
|
| 5 |
#include <lemon/lgf_reader.h> |
|
| 6 |
#include <lemon/gomory_hu.h> |
|
| 7 |
#include <cstdlib> |
|
| 8 |
|
|
| 9 |
using namespace std; |
|
| 10 |
using namespace lemon; |
|
| 11 |
|
|
| 12 |
typedef SmartGraph Graph; |
|
| 13 |
|
|
| 14 |
char test_lgf[] = |
|
| 15 |
"@nodes\n" |
|
| 16 |
"label\n" |
|
| 17 |
"0\n" |
|
| 18 |
"1\n" |
|
| 19 |
"2\n" |
|
| 20 |
"3\n" |
|
| 21 |
"4\n" |
|
| 22 |
"@arcs\n" |
|
| 23 |
" label capacity\n" |
|
| 24 |
"0 1 0 1\n" |
|
| 25 |
"1 2 1 1\n" |
|
| 26 |
"2 3 2 1\n" |
|
| 27 |
"0 3 4 5\n" |
|
| 28 |
"0 3 5 10\n" |
|
| 29 |
"0 3 6 7\n" |
|
| 30 |
"4 2 7 1\n" |
|
| 31 |
"@attributes\n" |
|
| 32 |
"source 0\n" |
|
| 33 |
"target 3\n"; |
|
| 34 |
|
|
| 35 |
GRAPH_TYPEDEFS(Graph); |
|
| 36 |
typedef Graph::EdgeMap<int> IntEdgeMap; |
|
| 37 |
typedef Graph::NodeMap<bool> BoolNodeMap; |
|
| 38 |
|
|
| 39 |
int cutValue(const Graph& graph, const BoolNodeMap& cut, |
|
| 40 |
const IntEdgeMap& capacity) {
|
|
| 41 |
|
|
| 42 |
int sum = 0; |
|
| 43 |
for (EdgeIt e(graph); e != INVALID; ++e) {
|
|
| 44 |
Node s = graph.u(e); |
|
| 45 |
Node t = graph.v(e); |
|
| 46 |
|
|
| 47 |
if (cut[s] != cut[t]) {
|
|
| 48 |
sum += capacity[e]; |
|
| 49 |
} |
|
| 50 |
} |
|
| 51 |
return sum; |
|
| 52 |
} |
|
| 53 |
|
|
| 54 |
|
|
| 55 |
int main() {
|
|
| 56 |
Graph graph; |
|
| 57 |
IntEdgeMap capacity(graph); |
|
| 58 |
|
|
| 59 |
std::istringstream input(test_lgf); |
|
| 60 |
GraphReader<Graph>(graph, input). |
|
| 61 |
edgeMap("capacity", capacity).run();
|
|
| 62 |
|
|
| 63 |
GomoryHu<Graph> ght(graph, capacity); |
|
| 64 |
ght.run(); |
|
| 65 |
|
|
| 66 |
for (NodeIt u(graph); u != INVALID; ++u) {
|
|
| 67 |
for (NodeIt v(graph); v != u; ++v) {
|
|
| 68 |
Preflow<Graph, IntEdgeMap> pf(graph, capacity, u, v); |
|
| 69 |
pf.runMinCut(); |
|
| 70 |
BoolNodeMap cm(graph); |
|
| 71 |
ght.minCutMap(u, v, cm); |
|
| 72 |
check(pf.flowValue() == ght.minCutValue(u, v), "Wrong cut 1"); |
|
| 73 |
check(cm[u] != cm[v], "Wrong cut 3"); |
|
| 74 |
check(pf.flowValue() == cutValue(graph, cm, capacity), "Wrong cut 2"); |
|
| 75 |
|
|
| 76 |
int sum=0; |
|
| 77 |
for(GomoryHu<Graph>::MinCutEdgeIt a(ght, u, v);a!=INVALID;++a) |
|
| 78 |
sum+=capacity[a]; |
|
| 79 |
check(sum == ght.minCutValue(u, v), "Problem with MinCutEdgeIt"); |
|
| 80 |
|
|
| 81 |
sum=0; |
|
| 82 |
for(GomoryHu<Graph>::MinCutNodeIt n(ght, u, v,true);n!=INVALID;++n) |
|
| 83 |
sum++; |
|
| 84 |
for(GomoryHu<Graph>::MinCutNodeIt n(ght, u, v,false);n!=INVALID;++n) |
|
| 85 |
sum++; |
|
| 86 |
check(sum == countNodes(graph), "Problem with MinCutNodeIt"); |
|
| 87 |
|
|
| 88 |
} |
|
| 89 |
} |
|
| 90 |
|
|
| 91 |
return 0; |
|
| 92 |
} |
| 1 | 1 |
EXTRA_DIST += \ |
| 2 | 2 |
lemon/lemon.pc.in \ |
| 3 | 3 |
lemon/CMakeLists.txt |
| 4 | 4 |
|
| 5 | 5 |
pkgconfig_DATA += lemon/lemon.pc |
| 6 | 6 |
|
| 7 | 7 |
lib_LTLIBRARIES += lemon/libemon.la |
| 8 | 8 |
|
| 9 | 9 |
lemon_libemon_la_SOURCES = \ |
| 10 | 10 |
lemon/arg_parser.cc \ |
| 11 | 11 |
lemon/base.cc \ |
| 12 | 12 |
lemon/color.cc \ |
| 13 | 13 |
lemon/lp_base.cc \ |
| 14 | 14 |
lemon/lp_skeleton.cc \ |
| 15 | 15 |
lemon/random.cc \ |
| 16 | 16 |
lemon/bits/windows.cc |
| 17 | 17 |
|
| 18 | 18 |
|
| 19 | 19 |
lemon_libemon_la_CXXFLAGS = \ |
| 20 | 20 |
$(GLPK_CFLAGS) \ |
| 21 | 21 |
$(CPLEX_CFLAGS) \ |
| 22 | 22 |
$(SOPLEX_CXXFLAGS) \ |
| 23 | 23 |
$(CLP_CXXFLAGS) |
| 24 | 24 |
|
| 25 | 25 |
lemon_libemon_la_LDFLAGS = \ |
| 26 | 26 |
$(GLPK_LIBS) \ |
| 27 | 27 |
$(CPLEX_LIBS) \ |
| 28 | 28 |
$(SOPLEX_LIBS) \ |
| 29 | 29 |
$(CLP_LIBS) |
| 30 | 30 |
|
| 31 | 31 |
if HAVE_GLPK |
| 32 | 32 |
lemon_libemon_la_SOURCES += lemon/glpk.cc |
| 33 | 33 |
endif |
| 34 | 34 |
|
| 35 | 35 |
if HAVE_CPLEX |
| 36 | 36 |
lemon_libemon_la_SOURCES += lemon/cplex.cc |
| 37 | 37 |
endif |
| 38 | 38 |
|
| 39 | 39 |
if HAVE_SOPLEX |
| 40 | 40 |
lemon_libemon_la_SOURCES += lemon/soplex.cc |
| 41 | 41 |
endif |
| 42 | 42 |
|
| 43 | 43 |
if HAVE_CLP |
| 44 | 44 |
lemon_libemon_la_SOURCES += lemon/clp.cc |
| 45 | 45 |
endif |
| 46 | 46 |
|
| 47 | 47 |
lemon_HEADERS += \ |
| 48 | 48 |
lemon/adaptors.h \ |
| 49 | 49 |
lemon/arg_parser.h \ |
| 50 | 50 |
lemon/assert.h \ |
| 51 | 51 |
lemon/bfs.h \ |
| 52 | 52 |
lemon/bin_heap.h \ |
| 53 | 53 |
lemon/circulation.h \ |
| 54 | 54 |
lemon/clp.h \ |
| 55 | 55 |
lemon/color.h \ |
| 56 | 56 |
lemon/concept_check.h \ |
| 57 | 57 |
lemon/connectivity.h \ |
| 58 | 58 |
lemon/counter.h \ |
| 59 | 59 |
lemon/core.h \ |
| 60 | 60 |
lemon/cplex.h \ |
| 61 | 61 |
lemon/dfs.h \ |
| 62 | 62 |
lemon/dijkstra.h \ |
| 63 | 63 |
lemon/dim2.h \ |
| 64 | 64 |
lemon/dimacs.h \ |
| 65 | 65 |
lemon/edge_set.h \ |
| 66 | 66 |
lemon/elevator.h \ |
| 67 | 67 |
lemon/error.h \ |
| 68 | 68 |
lemon/euler.h \ |
| 69 | 69 |
lemon/full_graph.h \ |
| 70 | 70 |
lemon/glpk.h \ |
| 71 |
lemon/gomory_hu.h \ |
|
| 71 | 72 |
lemon/graph_to_eps.h \ |
| 72 | 73 |
lemon/grid_graph.h \ |
| 73 | 74 |
lemon/hypercube_graph.h \ |
| 74 | 75 |
lemon/kruskal.h \ |
| 75 | 76 |
lemon/hao_orlin.h \ |
| 76 | 77 |
lemon/lgf_reader.h \ |
| 77 | 78 |
lemon/lgf_writer.h \ |
| 78 | 79 |
lemon/list_graph.h \ |
| 79 | 80 |
lemon/lp.h \ |
| 80 | 81 |
lemon/lp_base.h \ |
| 81 | 82 |
lemon/lp_skeleton.h \ |
| 82 | 83 |
lemon/list_graph.h \ |
| 83 | 84 |
lemon/maps.h \ |
| 84 | 85 |
lemon/math.h \ |
| 85 | 86 |
lemon/max_matching.h \ |
| 86 | 87 |
lemon/min_cost_arborescence.h \ |
| 87 | 88 |
lemon/nauty_reader.h \ |
| 88 | 89 |
lemon/path.h \ |
| 89 | 90 |
lemon/preflow.h \ |
| 90 | 91 |
lemon/radix_sort.h \ |
| 91 | 92 |
lemon/random.h \ |
| 92 | 93 |
lemon/smart_graph.h \ |
| 93 | 94 |
lemon/soplex.h \ |
| 94 | 95 |
lemon/suurballe.h \ |
| 95 | 96 |
lemon/time_measure.h \ |
| 96 | 97 |
lemon/tolerance.h \ |
| 97 | 98 |
lemon/unionfind.h \ |
| 98 | 99 |
lemon/bits/windows.h |
| 99 | 100 |
|
| 100 | 101 |
bits_HEADERS += \ |
| 101 | 102 |
lemon/bits/alteration_notifier.h \ |
| 102 | 103 |
lemon/bits/array_map.h \ |
| 103 | 104 |
lemon/bits/base_extender.h \ |
| 104 | 105 |
lemon/bits/bezier.h \ |
| 105 | 106 |
lemon/bits/default_map.h \ |
| 106 | 107 |
lemon/bits/edge_set_extender.h \ |
| 107 | 108 |
lemon/bits/enable_if.h \ |
| 108 | 109 |
lemon/bits/graph_adaptor_extender.h \ |
| 109 | 110 |
lemon/bits/graph_extender.h \ |
| 110 | 111 |
lemon/bits/map_extender.h \ |
| 111 | 112 |
lemon/bits/path_dump.h \ |
| 112 | 113 |
lemon/bits/solver_bits.h \ |
| 113 | 114 |
lemon/bits/traits.h \ |
| 114 | 115 |
lemon/bits/variant.h \ |
| 115 | 116 |
lemon/bits/vector_map.h |
| 116 | 117 |
|
| 117 | 118 |
concept_HEADERS += \ |
| 118 | 119 |
lemon/concepts/digraph.h \ |
| 119 | 120 |
lemon/concepts/graph.h \ |
| 120 | 121 |
lemon/concepts/graph_components.h \ |
| 121 | 122 |
lemon/concepts/heap.h \ |
| 122 | 123 |
lemon/concepts/maps.h \ |
| 123 | 124 |
lemon/concepts/path.h |
| 1 | 1 |
INCLUDE_DIRECTORIES( |
| 2 | 2 |
${CMAKE_SOURCE_DIR}
|
| 3 | 3 |
${CMAKE_BINARY_DIR}
|
| 4 | 4 |
) |
| 5 | 5 |
|
| 6 | 6 |
IF(HAVE_GLPK) |
| 7 | 7 |
INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
|
| 8 | 8 |
ENDIF(HAVE_GLPK) |
| 9 | 9 |
|
| 10 | 10 |
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
|
| 11 | 11 |
|
| 12 | 12 |
SET(TESTS |
| 13 | 13 |
adaptors_test |
| 14 | 14 |
bfs_test |
| 15 | 15 |
circulation_test |
| 16 | 16 |
counter_test |
| 17 | 17 |
dfs_test |
| 18 | 18 |
digraph_test |
| 19 | 19 |
dijkstra_test |
| 20 | 20 |
dim_test |
| 21 | 21 |
edge_set_test |
| 22 | 22 |
error_test |
| 23 | 23 |
euler_test |
| 24 |
gomory_hu_test |
|
| 24 | 25 |
graph_copy_test |
| 25 | 26 |
graph_test |
| 26 | 27 |
graph_utils_test |
| 27 | 28 |
hao_orlin_test |
| 28 | 29 |
heap_test |
| 29 | 30 |
kruskal_test |
| 30 | 31 |
maps_test |
| 31 | 32 |
max_matching_test |
| 32 | 33 |
min_cost_arborescence_test |
| 33 | 34 |
path_test |
| 34 | 35 |
preflow_test |
| 35 | 36 |
radix_sort_test |
| 36 | 37 |
random_test |
| 37 | 38 |
suurballe_test |
| 38 | 39 |
time_measure_test |
| 39 | 40 |
unionfind_test) |
| 40 | 41 |
|
| 41 | 42 |
IF(HAVE_LP) |
| 42 | 43 |
ADD_EXECUTABLE(lp_test lp_test.cc) |
| 43 | 44 |
IF(HAVE_GLPK) |
| 44 | 45 |
TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
|
| 45 | 46 |
ENDIF(HAVE_GLPK) |
| 46 | 47 |
ADD_TEST(lp_test lp_test) |
| 47 | 48 |
|
| 48 | 49 |
IF(WIN32 AND HAVE_GLPK) |
| 49 | 50 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
| 50 | 51 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
|
| 51 | 52 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
| 52 | 53 |
COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
|
| 53 | 54 |
COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
|
| 54 | 55 |
COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
|
| 55 | 56 |
) |
| 56 | 57 |
ENDIF(WIN32 AND HAVE_GLPK) |
| 57 | 58 |
ENDIF(HAVE_LP) |
| 58 | 59 |
|
| 59 | 60 |
IF(HAVE_MIP) |
| 60 | 61 |
ADD_EXECUTABLE(mip_test mip_test.cc) |
| 61 | 62 |
IF(HAVE_GLPK) |
| 62 | 63 |
TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
|
| 63 | 64 |
ENDIF(HAVE_GLPK) |
| 64 | 65 |
ADD_TEST(mip_test mip_test) |
| 65 | 66 |
|
| 66 | 67 |
IF(WIN32 AND HAVE_GLPK) |
| 67 | 68 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
| 68 | 69 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
|
| 69 | 70 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
| 70 | 71 |
COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
|
| 71 | 72 |
COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
|
| 72 | 73 |
COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
|
| 73 | 74 |
) |
| 74 | 75 |
ENDIF(WIN32 AND HAVE_GLPK) |
| 75 | 76 |
ENDIF(HAVE_MIP) |
| 76 | 77 |
|
| 77 | 78 |
FOREACH(TEST_NAME ${TESTS})
|
| 78 | 79 |
ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
|
| 79 | 80 |
TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
|
| 80 | 81 |
ADD_TEST(${TEST_NAME} ${TEST_NAME})
|
| 81 | 82 |
ENDFOREACH(TEST_NAME) |
| 1 | 1 |
EXTRA_DIST += \ |
| 2 | 2 |
test/CMakeLists.txt |
| 3 | 3 |
|
| 4 | 4 |
noinst_HEADERS += \ |
| 5 | 5 |
test/graph_test.h \ |
| 6 | 6 |
test/test_tools.h |
| 7 | 7 |
|
| 8 | 8 |
check_PROGRAMS += \ |
| 9 | 9 |
test/adaptors_test \ |
| 10 | 10 |
test/bfs_test \ |
| 11 | 11 |
test/circulation_test \ |
| 12 | 12 |
test/counter_test \ |
| 13 | 13 |
test/dfs_test \ |
| 14 | 14 |
test/digraph_test \ |
| 15 | 15 |
test/dijkstra_test \ |
| 16 | 16 |
test/dim_test \ |
| 17 | 17 |
test/edge_set_test \ |
| 18 | 18 |
test/error_test \ |
| 19 | 19 |
test/euler_test \ |
| 20 |
test/gomory_hu_test \ |
|
| 20 | 21 |
test/graph_copy_test \ |
| 21 | 22 |
test/graph_test \ |
| 22 | 23 |
test/graph_utils_test \ |
| 23 | 24 |
test/hao_orlin_test \ |
| 24 | 25 |
test/heap_test \ |
| 25 | 26 |
test/kruskal_test \ |
| 26 | 27 |
test/maps_test \ |
| 27 | 28 |
test/max_matching_test \ |
| 28 | 29 |
test/min_cost_arborescence_test \ |
| 29 | 30 |
test/path_test \ |
| 30 | 31 |
test/preflow_test \ |
| 31 | 32 |
test/radix_sort_test \ |
| 32 | 33 |
test/random_test \ |
| 33 | 34 |
test/suurballe_test \ |
| 34 | 35 |
test/test_tools_fail \ |
| 35 | 36 |
test/test_tools_pass \ |
| 36 | 37 |
test/time_measure_test \ |
| 37 | 38 |
test/unionfind_test |
| 38 | 39 |
|
| 39 | 40 |
if HAVE_LP |
| 40 | 41 |
check_PROGRAMS += test/lp_test |
| 41 | 42 |
endif HAVE_LP |
| 42 | 43 |
if HAVE_MIP |
| 43 | 44 |
check_PROGRAMS += test/mip_test |
| 44 | 45 |
endif HAVE_MIP |
| 45 | 46 |
|
| 46 | 47 |
TESTS += $(check_PROGRAMS) |
| 47 | 48 |
XFAIL_TESTS += test/test_tools_fail$(EXEEXT) |
| 48 | 49 |
|
| 49 | 50 |
test_adaptors_test_SOURCES = test/adaptors_test.cc |
| 50 | 51 |
test_bfs_test_SOURCES = test/bfs_test.cc |
| 51 | 52 |
test_circulation_test_SOURCES = test/circulation_test.cc |
| 52 | 53 |
test_counter_test_SOURCES = test/counter_test.cc |
| 53 | 54 |
test_dfs_test_SOURCES = test/dfs_test.cc |
| 54 | 55 |
test_digraph_test_SOURCES = test/digraph_test.cc |
| 55 | 56 |
test_dijkstra_test_SOURCES = test/dijkstra_test.cc |
| 56 | 57 |
test_dim_test_SOURCES = test/dim_test.cc |
| 57 | 58 |
test_edge_set_test_SOURCES = test/edge_set_test.cc |
| 58 | 59 |
test_error_test_SOURCES = test/error_test.cc |
| 59 | 60 |
test_euler_test_SOURCES = test/euler_test.cc |
| 61 |
test_gomory_hu_test_SOURCES = test/gomory_hu_test.cc |
|
| 60 | 62 |
test_graph_copy_test_SOURCES = test/graph_copy_test.cc |
| 61 | 63 |
test_graph_test_SOURCES = test/graph_test.cc |
| 62 | 64 |
test_graph_utils_test_SOURCES = test/graph_utils_test.cc |
| 63 | 65 |
test_heap_test_SOURCES = test/heap_test.cc |
| 64 | 66 |
test_kruskal_test_SOURCES = test/kruskal_test.cc |
| 65 | 67 |
test_hao_orlin_test_SOURCES = test/hao_orlin_test.cc |
| 66 | 68 |
test_lp_test_SOURCES = test/lp_test.cc |
| 67 | 69 |
test_maps_test_SOURCES = test/maps_test.cc |
| 68 | 70 |
test_mip_test_SOURCES = test/mip_test.cc |
| 69 | 71 |
test_max_matching_test_SOURCES = test/max_matching_test.cc |
| 70 | 72 |
test_min_cost_arborescence_test_SOURCES = test/min_cost_arborescence_test.cc |
| 71 | 73 |
test_path_test_SOURCES = test/path_test.cc |
| 72 | 74 |
test_preflow_test_SOURCES = test/preflow_test.cc |
| 73 | 75 |
test_radix_sort_test_SOURCES = test/radix_sort_test.cc |
| 74 | 76 |
test_suurballe_test_SOURCES = test/suurballe_test.cc |
| 75 | 77 |
test_random_test_SOURCES = test/random_test.cc |
| 76 | 78 |
test_test_tools_fail_SOURCES = test/test_tools_fail.cc |
| 77 | 79 |
test_test_tools_pass_SOURCES = test/test_tools_pass.cc |
| 78 | 80 |
test_time_measure_test_SOURCES = test/time_measure_test.cc |
| 79 | 81 |
test_unionfind_test_SOURCES = test/unionfind_test.cc |
0 comments (0 inline)