# HG changeset patch
# User Peter Kovacs <kpeter@inf.elte.hu>
# Date 1240478711 -7200
# Node ID b72846480f05ab53f80323bee1e111ecc6e9bbc9
# Parent 85cb3aa71cced72f8915b8abf50f705037a76bb1
VS compatibility fix (#268)
diff --git a/lemon/network_simplex.h b/lemon/network_simplex.h
|
a
|
b
|
|
| 381 | 381 | const double BLOCK_SIZE_FACTOR = 2.0; |
| 382 | 382 | const int MIN_BLOCK_SIZE = 10; |
| 383 | 383 | |
| 384 | | _block_size = std::max( int(BLOCK_SIZE_FACTOR * sqrt(_arc_num)), |
| 385 | | MIN_BLOCK_SIZE ); |
| | 384 | _block_size = |
| | 385 | std::max( int(BLOCK_SIZE_FACTOR * sqrt(double(_arc_num))), |
| | 386 | MIN_BLOCK_SIZE ); |
| 386 | 387 | } |
| 387 | 388 | |
| 388 | 389 | // Find next entering arc |
| … |
… |
|
| 457 | 458 | const double MINOR_LIMIT_FACTOR = 0.1; |
| 458 | 459 | const int MIN_MINOR_LIMIT = 3; |
| 459 | 460 | |
| 460 | | _list_length = std::max( int(LIST_LENGTH_FACTOR * sqrt(_arc_num)), |
| 461 | | MIN_LIST_LENGTH ); |
| 462 | | _minor_limit = std::max( int(MINOR_LIMIT_FACTOR * _list_length), |
| 463 | | MIN_MINOR_LIMIT ); |
| | 461 | _list_length = |
| | 462 | std::max( int(LIST_LENGTH_FACTOR * sqrt(double(_arc_num))), |
| | 463 | MIN_LIST_LENGTH ); |
| | 464 | _minor_limit = |
| | 465 | std::max( int(MINOR_LIMIT_FACTOR * _list_length), |
| | 466 | MIN_MINOR_LIMIT ); |
| 464 | 467 | _curr_length = _minor_count = 0; |
| 465 | 468 | _candidates.resize(_list_length); |
| 466 | 469 | } |
| … |
… |
|
| 577 | 580 | const double HEAD_LENGTH_FACTOR = 0.1; |
| 578 | 581 | const int MIN_HEAD_LENGTH = 3; |
| 579 | 582 | |
| 580 | | _block_size = std::max( int(BLOCK_SIZE_FACTOR * sqrt(_arc_num)), |
| 581 | | MIN_BLOCK_SIZE ); |
| 582 | | _head_length = std::max( int(HEAD_LENGTH_FACTOR * _block_size), |
| 583 | | MIN_HEAD_LENGTH ); |
| | 583 | _block_size = |
| | 584 | std::max( int(BLOCK_SIZE_FACTOR * sqrt(double(_arc_num))), |
| | 585 | MIN_BLOCK_SIZE ); |
| | 586 | _head_length = |
| | 587 | std::max( int(HEAD_LENGTH_FACTOR * _block_size), |
| | 588 | MIN_HEAD_LENGTH ); |
| 584 | 589 | _candidates.resize(_head_length + _block_size); |
| 585 | 590 | _curr_length = 0; |
| 586 | 591 | } |
| … |
… |
|
| 1225 | 1230 | } |
| 1226 | 1231 | |
| 1227 | 1232 | // Store the arcs in a mixed order |
| 1228 | | int k = std::max(int(sqrt(_arc_num)), 10); |
| | 1233 | int k = std::max(int(sqrt(double(_arc_num))), 10); |
| 1229 | 1234 | int i = 0; |
| 1230 | 1235 | for (ArcIt e(_graph); e != INVALID; ++e) { |
| 1231 | 1236 | _arc_ref[i] = e; |