[Graph] dijkstra_shortest_paths color map
I work with very large implicit graphs that use out-of-core storage for
properties, including the vertex color property, but the following bit of
code in dijkstra_shortest_paths_no_init (boost-1.33.0) seems to preclude the
use of a custom color map.
std::vector
On Nov 15, 2005, at 12:53 PM, Daniel Mitchell wrote:
I work with very large implicit graphs that use out-of-core storage for properties, including the vertex color property,
Very cool.
but the following bit of code in dijkstra_shortest_paths_no_init (boost-1.33.0) seems to preclude the use of a custom color map.
std::vector
color(num_vertices(g)); default_color_type c = white_color; breadth_first_visit(g, s, Q, bfs_vis, make_iterator_property_map(&color[0], index_map, c)); What is the rationale for the above code, and how should I work around it?
Well, I'd say that's a bug in dijkstra_shortest_paths_no_init, which
should have a ColorMap template parameter. The best way to fix this
would be to add a ColorMap parameter at the end, e.g., to turn
dijkstra_shortest_paths_no_init into:
template
On Wednesday 16 November 2005 01:54 pm, Doug Gregor wrote:
If you happen to make this change, I was greatly appreciate it if you would send it to the list so that we can incorporate it in future versions of the library. If we're quick, we can even get it into the upcoming 1.33.1 bug-fix release.
Done. I made similar changes to dijkstra_shortest_paths. If you think there's time before the 1.33.1 release, I'd like to add color map support to the named parameter version of dijkstra_shortest_paths, which requires the addition of color map arguments to dijkstra_dispatch1 and dijkstra_dispatch2. Daniel
On Sunday 20 November 2005 12:15 pm, Daniel Mitchell wrote:
I'd like to add color map support to the named parameter version of dijkstra_shortest_paths, which requires the addition of color map arguments to dijkstra_dispatch1 and dijkstra_dispatch2.
Just to clarify, I'm imagining changing the call to dijkstra_dispatch1 from
dijkstra_shortest_paths (named parameter version) to
detail::dijkstra_dispatch1
(g, s,
get_param(params, vertex_distance),
choose_const_pmap(get_param(params, edge_weight), g, edge_weight),
choose_const_pmap(get_param(params, vertex_index), g, vertex_index),
params,
get_param(params, color_map));
Inside dijkstra_dispatch1 we would have
typename std::vector
On Nov 20, 2005, at 1:15 PM, Daniel Mitchell wrote:
On Wednesday 16 November 2005 01:54 pm, Doug Gregor wrote:
If you happen to make this change, I was greatly appreciate it if you would send it to the list so that we can incorporate it in future versions of the library. If we're quick, we can even get it into the upcoming 1.33.1 bug-fix release.
Done. I made similar changes to dijkstra_shortest_paths.
Great, thanks!
If you think there's time before the 1.33.1 release, I'd like to add color map support to the named parameter version of dijkstra_shortest_paths, which requires the addition of color map arguments to dijkstra_dispatch1 and dijkstra_dispatch2.
Your patch looks good; assuming it doesn't trigger any strange errors in regression testing, it'll go into 1.33.1 (final). There's still a little time before 1.33.1; again, assuming nothing breaks in the process, we can still get the color_map parameter into Dijkstra's algorithm. Doug
On Monday 21 November 2005 02:51 pm, Doug Gregor wrote:
Your patch looks good; assuming it doesn't trigger any strange errors in regression testing, it'll go into 1.33.1 (final).
The attached header incorporates all my changes. My only concern is the initialization of the color map in dijkstra_shortest_paths, which is redundant when the default color map is used. Daniel
Hi Doug. I checked Boost's webcvs and noticed that my changes to the named parameter version of dijkstra_shortest_paths have not been committed. Was there a problem with my patch? I've attached my code to this message for your convenience. Thanks, Daniel
On Dec 3, 2005, at 4:30 PM, Daniel Mitchell wrote:
Hi Doug. I checked Boost's webcvs and noticed that my changes to the named parameter version of dijkstra_shortest_paths have not been committed. Was there a problem with my patch? I've attached my code to this message for your convenience.
Gaa! I thought I'd committed this with the other part of your patch. Anyway, it's there now. Doug
On Nov 22, 2005, at 5:15 PM, Daniel Mitchell wrote:
On Monday 21 November 2005 02:51 pm, Doug Gregor wrote:
Your patch looks good; assuming it doesn't trigger any strange errors in regression testing, it'll go into 1.33.1 (final).
The attached header incorporates all my changes. My only concern is the initialization of the color map in dijkstra_shortest_paths, which is redundant when the default color map is used.
Thanks! It's in Boost 1.33.1, if you didn't already notice. Doug
participants (3)
-
Daniel Mitchell
-
Doug Gregor
-
Douglas Gregor