Boost logo

Boost Users :

Subject: Re: [Boost-users] BGL: Problem with dijkstra_shortest_paths
From: Alex Hagen-Zanker (ahh34_at_[hidden])
Date: 2011-06-30 11:47:14

> 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,

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 list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at