libboost, python, and dijkstra shortest path

Roman Yakovenko roman.yakovenko at gmail.com
Wed Nov 29 15:14:02 EST 2006


On 29 Nov 2006 11:35:52 -0800, Bytter <bytter at gmail.com> wrote:
> Ok, found the solution here: http://www.osl.iu.edu/~dgregor/bgl-python/
>
> But still cannot make anything that works... Anyone who has experience
> in this area can help me with the following code:
>
> 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)

You'd better ask the question on boost.python or boost-users mailing lists:
http://boost.org/more/mailing_lists.htm

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Python-list mailing list