# HG changeset patch
# User Peter Kovacs <kpeter@inf.elte.hu>
# Date 1240605396 -7200
# Node ID 0eb152268d6d1271a52e841d6e890544b5a2f294
# Parent ea2c9187404a7cd2dbcf4e2c93dcdc30807188f2
Debug check for lower<=upper in Circulation (#266)
diff --git a/lemon/circulation.h b/lemon/circulation.h
a
|
b
|
|
341 | 341 | |
342 | 342 | private: |
343 | 343 | |
| 344 | bool checkBoundMaps() { |
| 345 | for (ArcIt e(_g);e!=INVALID;++e) { |
| 346 | if (_tol.less((*_up)[e], (*_lo)[e])) return false; |
| 347 | } |
| 348 | return true; |
| 349 | } |
| 350 | |
344 | 351 | void createStructures() { |
345 | 352 | _node_num = _el = countNodes(_g); |
346 | 353 | |
… |
… |
|
490 | 497 | /// to the lower bound. |
491 | 498 | void init() |
492 | 499 | { |
| 500 | LEMON_DEBUG(checkBoundMaps(), |
| 501 | "Upper bounds must be greater or equal to the lower bounds"); |
| 502 | |
493 | 503 | createStructures(); |
494 | 504 | |
495 | 505 | for(NodeIt n(_g);n!=INVALID;++n) { |
… |
… |
|
519 | 529 | /// to construct the initial solution. |
520 | 530 | void greedyInit() |
521 | 531 | { |
| 532 | LEMON_DEBUG(checkBoundMaps(), |
| 533 | "Upper bounds must be greater or equal to the lower bounds"); |
| 534 | |
522 | 535 | createStructures(); |
523 | 536 | |
524 | 537 | for(NodeIt n(_g);n!=INVALID;++n) { |