16 Jul
2007
16 Jul
'07
12:12 p.m.
On 7/16/07, Ewgenij Sokolovski
Hello. How does the distance_map container looks like if you apply the dijkstra_shortest_paths algorithm on a graph, and the graph is not connected? So how does the entry d[i] looks like if it is not possible to reach node i from the start node of the dijkstra_algorithm? I couldn't find this information in the online manual, the case of the predecessor_map is described there but not the one of the distance map.
Hi Ewgenij, Every entry in the distance map is initialized with std::numeric_limits<D>::max(), where D is the value type held by the distance map. You can override this by supplying the parameter "inf" described in the documentation. Regards, Aaron