Boost Users :
Subject: Re: [Boost-users] BGL: Problem with dijkstra_shortest_paths
From: Alex Hagen-Zanker (ahh34_at_[hidden])
Date: 2011-07-01 04:11:14
On 30/06/2011 21:47, Stephen Woodbridge wrote:
> That said, I assume add_edge does add the nodes if they do not exist
> in the graph when the edge is added and that when an edge is added and
> one or both nodes exist it uses them, since the code works and I
> appear to be getting the correct answers.
You're right, sorry to misinform you.
From the documentation:
"if either vertex descriptor u or v (which are integers) has a value
greater than the current number of vertices in the graph, the graph is
enlarged so that the number of vertices is std::max(u,v) + 1. "
-- Alex Hagen-Zanker University of Cambridge, Department of Architecture, 1-5 Scroope Terrace, Cambridge, CB2 1PX, United Kingdom Tel: +44(0) 1223 330573
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net