1.1 --- a/lemon/network_simplex.h Sun Mar 02 22:55:27 2008 +0000
1.2 +++ b/lemon/network_simplex.h Fri Mar 07 00:24:23 2008 +0000
1.3 @@ -280,8 +280,8 @@
1.4 EdgeIt _next_edge, _min_edge;
1.5 int _sample_size;
1.6
1.7 + static const int SAMPLE_SIZE_FACTOR = 15;
1.8 static const int MIN_SAMPLE_SIZE = 10;
1.9 - static const double SAMPLE_SIZE_FACTOR = 0.0015;
1.10
1.11 public:
1.12
1.13 @@ -289,7 +289,8 @@
1.14 LimitedSearchPivotRule(NetworkSimplex &ns) :
1.15 _ns(ns), _next_edge(ns._graph), _min_edge(ns._graph)
1.16 {
1.17 - _sample_size = int(SAMPLE_SIZE_FACTOR * countEdges(_ns._graph));
1.18 + _sample_size = countEdges(_ns._graph) *
1.19 + SAMPLE_SIZE_FACTOR / 10000;
1.20 if (_sample_size < MIN_SAMPLE_SIZE)
1.21 _sample_size = MIN_SAMPLE_SIZE;
1.22 }
1.23 @@ -342,8 +343,8 @@
1.24 int _minor_count;
1.25 EdgeIt _next_edge;
1.26
1.27 - static const double LIST_LENGTH_FACTOR = 0.002;
1.28 - static const double MINOR_LIMIT_FACTOR = 0.1;
1.29 + static const int LIST_LENGTH_FACTOR = 20;
1.30 + static const int MINOR_LIMIT_FACTOR = 10;
1.31 static const int MIN_LIST_LENGTH = 10;
1.32 static const int MIN_MINOR_LIMIT = 2;
1.33
1.34 @@ -355,10 +356,10 @@
1.35 {
1.36 int edge_num = countEdges(_ns._graph);
1.37 _minor_count = 0;
1.38 - _list_length = int(edge_num * LIST_LENGTH_FACTOR);
1.39 + _list_length = edge_num * LIST_LENGTH_FACTOR / 10000;
1.40 if (_list_length < MIN_LIST_LENGTH)
1.41 _list_length = MIN_LIST_LENGTH;
1.42 - _minor_limit = int(_list_length * MINOR_LIMIT_FACTOR);
1.43 + _minor_limit = _list_length * MINOR_LIMIT_FACTOR / 100;
1.44 if (_minor_limit < MIN_MINOR_LIMIT)
1.45 _minor_limit = MIN_MINOR_LIMIT;
1.46 }