473,327 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

graphs in python...

Hello,
I read "Python Patterns: Implementing Graphs" document on the website
and was impressed with doing graphs in this fashion. Is this still the
best documented way to do graphs. The document alludes to a follow up
article tuned for speed but I have not found it. Can anyone suggest
other ways that might be faster? I am looking to implement a graph with
over 11k nodes and I am afraid that the speed might begin to wither. I
have implemented a test version with this code and a set of 5k nodes and
the speed could be quicker:)
Thanks a lot...

--
Douglas F. Calvert <do******@anize.org>
Jul 18 '05 #1
2 2043
Douglas F. Calvert wrote:
Hello,
I read "Python Patterns: Implementing Graphs" document on the website
and was impressed with doing graphs in this fashion. Is this still the
best documented way to do graphs. The document alludes to a follow up
article tuned for speed but I have not found it. Can anyone suggest
other ways that might be faster? I am looking to implement a graph with
over 11k nodes and I am afraid that the speed might begin to wither. I
have implemented a test version with this code and a set of 5k nodes and
the speed could be quicker:)


Maybe its faster to store the adjacences in a matrix (e.g. Numeric array) -
some graph ops then are simple matrix ops.

A node of course is than only an number - used as index. That should speed
things up. You can of course have a dictionary to map names to nums and
vice versa.

Diez
Jul 18 '05 #2
"Diez B. Roggisch" <de************@web.de> wrote in message news:<bq*************@news.t-online.com>...
Douglas F. Calvert wrote:
Hello,
I read "Python Patterns: Implementing Graphs" ...


Maybe its faster to store the adjacences in a matrix (e.g. Numeric array) -
some graph ops then are simple matrix ops.


That will work if the graph is extremely dense. If it is not I don't
think it is a good idea. Please also look at kjbuckets available as part
of the gadfly package as either kjbuckets0.py or kjbucketsmodule.c.

http://gadfly.sourceforge.net
http://cvs.sourceforge.net/viewcvs.p...fly/kjbuckets/
http://cvs.sourceforge.net/viewcvs.p.../kjbuckets0.py

--Aaron Watters

ps: off topic http://xsdb.sourceforge.net
===
An apple every 8 hours will keep 3 doctors away. --kliban
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Mark Fenbers | last post by:
I am investigating Python for the sake of ultimately generating hydrographs (such as this: http://ahps.erh.noaa.gov/iln/ahps/RiverDat/gifs/prgo1.png) on-the-fly from a web server cluster. I have...
9
by: rhmd | last post by:
I need to create image files (eg bmp or jpeg) of xy scatter graphs (i.e., graphs in which markers denote individual points; the markers need to be small polygons of various sizes, shapes, colors,...
7
by: Florian Lindner | last post by:
Hello, I'm looking for a program or python library to draw graphs. They should look like the that: /--------\ /--------\ | Node A | ------ belongs to ----> | Node B |...
12
by: | last post by:
I've trolled the lists, FAQs, and Net as a whole, but can't find anything definitive to answer this. We're looking for real-time graph capability (bar, line, etc), so that we can display...
2
by: DurumDara | last post by:
Hi ! I want to create graphs (edges, nodes) from python. In the last project I used graph.py that create dot files - and then I can convert these dot files with ATT neato command line tool. But...
4
by: Giandomenico Sica | last post by:
Call for Cooperation An Atlas of Linguistic Graphs I'm a researcher in graph theory and networks. I'm working about a project connected with the theory and the applications of linguistic...
7
by: Heiko Niedermeyer | last post by:
Sorry for the fuzzy subject... Currently I'm writing a little programm to extract some chemical information out of a text file, and then present it in a pleasant way. The Extraction works so...
2
by: Sanhita Mallick | last post by:
Hi. I am a newbie to Python. I am trying to implement a Python code for graph manipulation. My graphs are about 200-500 nodes big. Excepting for the short basic graph implementation info on...
6
by: Carl Banks | last post by:
I was wondering if anyone had any advice on this. This is not to study graph theory; I'm using the graph to represent a problem domain. The graphs could be arbitrarily large, and could easily...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.