libboost, python, and dijkstra shortest path

B

Bytter

Hi everyone,

I need to implement a very quick (performance-wise) Dijkstra shortest
path in python, and found that libboost already has such thing. Problem
is: I cannot find the installation package for my Python 2.4 under
windows. Can someone please provide me instructions for installing
libboost for python?

In alternative, if someone can point out to a fast Dijkstra shortest
path in python (the network is over 1 million vertexes), I would
appreciate.

Thanks in advance,

Hugo Ferreira
 
B

Bytter

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)
 
R

Roman Yakovenko

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top