Changeset 2593:8eed667ea23c in lemon0.x
 Timestamp:
 03/07/08 01:24:23 (16 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@3476
 Location:
 lemon
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

lemon/cycle_canceling.h
r2588 r2593 123 123 // The maximum number of iterations for the first execution of the 124 124 // BellmanFord algorithm. It should be at least 2. 125 static const int BF_FIRST_LIMIT = 2;125 static const int BF_FIRST_LIMIT = 2; 126 126 // The iteration limit for the BellmanFord algorithm is multiplied 127 // by BF_ ALPHAin every round.128 static const double BF_ALPHA = 1.5;127 // by BF_LIMIT_FACTOR/100 in every round. 128 static const int BF_LIMIT_FACTOR = 150; 129 129 130 130 private: … … 502 502 503 503 if (!cycle_found) 504 length_bound = int(length_bound * BF_ALPHA);504 length_bound = length_bound * BF_LIMIT_FACTOR / 100; 505 505 } 506 506 } 
lemon/network_simplex.h
r2588 r2593 281 281 int _sample_size; 282 282 283 static const int SAMPLE_SIZE_FACTOR = 15; 283 284 static const int MIN_SAMPLE_SIZE = 10; 284 static const double SAMPLE_SIZE_FACTOR = 0.0015;285 285 286 286 public: … … 290 290 _ns(ns), _next_edge(ns._graph), _min_edge(ns._graph) 291 291 { 292 _sample_size = int(SAMPLE_SIZE_FACTOR * countEdges(_ns._graph)); 292 _sample_size = countEdges(_ns._graph) * 293 SAMPLE_SIZE_FACTOR / 10000; 293 294 if (_sample_size < MIN_SAMPLE_SIZE) 294 295 _sample_size = MIN_SAMPLE_SIZE; … … 343 344 EdgeIt _next_edge; 344 345 345 static const double LIST_LENGTH_FACTOR = 0.002;346 static const double MINOR_LIMIT_FACTOR = 0.1;346 static const int LIST_LENGTH_FACTOR = 20; 347 static const int MINOR_LIMIT_FACTOR = 10; 347 348 static const int MIN_LIST_LENGTH = 10; 348 349 static const int MIN_MINOR_LIMIT = 2; … … 356 357 int edge_num = countEdges(_ns._graph); 357 358 _minor_count = 0; 358 _list_length = int(edge_num * LIST_LENGTH_FACTOR);359 _list_length = edge_num * LIST_LENGTH_FACTOR / 10000; 359 360 if (_list_length < MIN_LIST_LENGTH) 360 361 _list_length = MIN_LIST_LENGTH; 361 _minor_limit = int(_list_length * MINOR_LIMIT_FACTOR);362 _minor_limit = _list_length * MINOR_LIMIT_FACTOR / 100; 362 363 if (_minor_limit < MIN_MINOR_LIMIT) 363 364 _minor_limit = MIN_MINOR_LIMIT;
Note: See TracChangeset
for help on using the changeset viewer.