Ticket #5659: diff
File diff, 1.7 KB (added by , 11 years ago) |
---|
-
dijkstra_shortest_paths.hpp
420 420 dummy_property_map p_map; 421 421 422 422 typedef typename property_traits<DistanceMap>::value_type D; 423 D inf = choose_param(get_param(params, distance_inf_t()), 424 (std::numeric_limits<D>::max)()); 425 423 426 dijkstra_shortest_paths 424 427 (g, s, 425 428 choose_param(get_param(params, vertex_predecessor), p_map), … … 427 430 choose_param(get_param(params, distance_compare_t()), 428 431 std::less<D>()), 429 432 choose_param(get_param(params, distance_combine_t()), 430 closed_plus<D>()), 431 choose_param(get_param(params, distance_inf_t()), 432 (std::numeric_limits<D>::max)()), 433 closed_plus<D>(inf)), 434 inf, 433 435 choose_param(get_param(params, distance_zero_t()), 434 436 D()), 435 437 choose_param(get_param(params, graph_visitor), -
relax.hpp
22 22 template <class T> 23 23 struct closed_plus 24 24 { 25 const T inf; 26 27 closed_plus() : inf(std::numeric_limits<T>::max()) { } 28 closed_plus(T inf) : inf(inf) { } 29 25 30 T operator()(const T& a, const T& b) const { 26 31 using namespace std; 27 const T inf = (std::numeric_limits<T>::max)();28 32 if (a == inf) return inf; 29 33 if (b == inf) return inf; 30 34 return a + b;