|
Boost Users : |
From: Hugo Ferreira (bytter_at_[hidden])
Date: 2006-11-30 06:58:24
HI there,
I'm trying to use the BGL bindings for python found here:
http://www.osl.iu.edu/~dgregor/bgl-python/
The problem is that I can't seem to understand how the
dijkstra_shortest_paths() and the corresponding graph works. My code,
so far, is like this:
---8<---8<---
import boost as bgl
graph = bgl.Graph()
a = graph.add_vertex()
b = graph.add_vertex()
e = graph.add_edge(a, b)
weights = graph.edge_property_map('integer')
weights[e] = 5
graph.edge_properties['weight'] = weights
boost.dijkstra_shortest_paths(graph, a)
---8<---8<---
Which, of course, complains about the dijkstra_shortest_paths function
signature. Can anyone please provide me an working example of setting
up a graph and calling this function? I basically need the shortest
path from vertex A to vertex B.
Thanks in advance,
Hugo Ferreira
-- GPG Fingerprint: B0D7 1249 447D F5BB 22C5 5B9B 078C 2615 504B 7B85
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