Boost Users :
Subject: Re: [Boost-users] BGL: Problem with dijkstra_shortest_paths
From: Stephen Woodbridge (woodbri_at_[hidden])
Date: 2011-06-30 12:32:33
You have been very helpful. I got it to work, here is the final code:
On 6/30/2011 11:47 AM, Alex Hagen-Zanker wrote:
>> I think this has gotten me closer to a solution, but I'm running into
>> a compile issue:
>> where line 136 is:
>> pe.edge_id = get_edge_id(graph_t, pe.parent_id, pe.vertex_id);
> graph_t is a type not an object.
> also, get_edge_id will require template parameters, how about:
> pe.edge_id = get_edge_id<graph_t, E>(graph, pe.parent_id, pe.vertex_id);
> However, the E template parameter is really not necessary if you just
> use the typedef that you commented out. Once you get rid of E, the G
> template parameter will be recognized automatically:
> pe.edge_id = get_edge_id(graph, pe.parent_id, pe.vertex_id);
> Also I noticed that you set the number of nodes to 1. Note that add_edge
> assumes your nodes to be present, and does not add nodes if the required
> nodes are not there.
>> Also it occurs to me that getting the edge based on the vertexes
>> rather than the vertex ids might be faster.
> It will be just the same. Since the vertices are stored in a vector,
> vertex_descriptors are just indices to a vector.
> Boost-users mailing list
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