Boost Users :
Subject: Re: [Boost-users] Problem with dijkstra_shortest_paths
From: David Doria (daviddoria_at_[hidden])
Date: 2011-06-30 08:05:16
On Wed, Jun 29, 2011 at 6:07 PM, Stephen Woodbridge
> Hi all,
> I am C programmer floundering in a C++ world!
> I have the function that I call from C that builds a graph, runs
> dijkstra_shortest_paths(), then extracts the results and passes them back to
> a C array of structs. Code is in pastebin:
> This seems to work and everything looks ok, EXCEPT the edge ids are not
> correct. I suspect this is because I'm not doing something correctly and I
> have been messing with this for a couple weeks without success, so I think
> its time to ask for help.
> So in the function:
> graph_add_edge(G &graph, int id, int source, int target, float8 cost)
> id is the edge id
> source is the node id at the start of the edge
> target is the node_id at the end of the edge
> cost is the cost to traverse the edge from source to target
> I would really appreciate it if someone could look at this and point out
> what I might be doing wrong.
> Thanks in advance,
There are a few Dijkstra examples here, do they help?
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