Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > libboost, python, and dijkstra shortest path

Reply
Thread Tools

libboost, python, and dijkstra shortest path

 
 
Bytter
Guest
Posts: n/a
 
      11-29-2006
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

 
Reply With Quote
 
 
 
 
Bytter
Guest
Posts: n/a
 
      11-29-2006
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)


On Nov 29, 5:51 pm, "Bytter" <(E-Mail Removed)> wrote:
> 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


 
Reply With Quote
 
 
 
 
Roman Yakovenko
Guest
Posts: n/a
 
      11-29-2006
On 29 Nov 2006 11:35:52 -0800, Bytter <(E-Mail Removed)> 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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Python Dijkstra Shortest Path Gabriel Genellina Python 0 05-16-2007 07:20 AM
Python Dijkstra Shortest Path Hugo Ferreira Python 0 05-16-2007 03:39 AM
shortest mean path length diffuser78@gmail.com Python 0 10-06-2006 08:51 PM
Recursive algoritme for finding the shortest path Webdad C++ 20 12-09-2004 06:51 PM
Shortest path algorithm (other than Dijkstra) ThanhVu Nguyen C++ 6 08-24-2004 12:50 PM



Advertisments