Changeset 814:11c946fa8d13 in lemon for lemon/howard.h
 Timestamp:
 08/11/09 22:52:35 (10 years ago)
 Branch:
 default
 Phase:
 public
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/howard.h
r811 r814 179 179 Tolerance _tolerance; 180 180 181 // Infinite constant 182 const LargeValue INF; 183 181 184 public: 182 185 … … 231 234 Howard( const Digraph &digraph, 232 235 const LengthMap &length ) : 233 _gr(digraph), _length(length), _cycle_path(NULL), _local_path(false), 236 _gr(digraph), _length(length), _best_found(false), 237 _best_length(0), _best_size(1), _cycle_path(NULL), _local_path(false), 234 238 _policy(digraph), _reached(digraph), _level(digraph), _dist(digraph), 235 _comp(digraph), _in_arcs(digraph) 239 _comp(digraph), _in_arcs(digraph), 240 INF(std::numeric_limits<LargeValue>::has_infinity ? 241 std::numeric_limits<LargeValue>::infinity() : 242 std::numeric_limits<LargeValue>::max()) 236 243 {} 237 244 … … 308 315 } 309 316 // Update the best cycle (global minimum mean cycle) 310 if ( !_best_found  (_curr_found &&317 if ( _curr_found && (!_best_found  311 318 _curr_length * _best_size < _best_length * _curr_size) ) { 312 319 _best_found = true; … … 447 454 } 448 455 for (int i = 0; i < int(_nodes>size()); ++i) { 449 _dist[(*_nodes)[i]] = std::numeric_limits<LargeValue>::max();456 _dist[(*_nodes)[i]] = INF; 450 457 } 451 458 Node u, v;
Note: See TracChangeset
for help on using the changeset viewer.