Efficiently storing a directed graph

2008-03-01 Thread Kelly Jones
I have a directed graph (nodes and edges) that I want to store efficiently: given two nodes, I want to quickly find the shortest path between them. The graph is NOT acyclic (it's not a tree), is fairly sparse (about 1 edges for 2500 nodes), and changes occasionally. I know PostgreSQL/MySQL

Re: Efficiently storing a directed graph

2008-03-01 Thread Peter Brawley
Kelly, I'm not married to using SQL: are there other efficient solutions to store directed graphs? Could I hack something up in Perl or Ruby and then serialize my in-memory graph to a file (for efficient saving/reloading)? Did you look at Dijkstra's algorithm? PB -- MySQL General Mailing

Re: Efficiently storing a directed graph

2008-03-01 Thread mgainty
To: mysql@lists.mysql.com Sent: Saturday, March 01, 2008 7:19 PM Subject: Re: Efficiently storing a directed graph Kelly, I'm not married to using SQL: are there other efficient solutions to store directed graphs? Could I hack something up in Perl or Ruby and then serialize my in-memory

Re: [GENERAL] Efficiently storing a directed graph

2008-03-01 Thread Joe Conway
Kelly Jones wrote: I have a directed graph (nodes and edges) that I want to store efficiently: given two nodes, I want to quickly find the shortest path between them. The graph is NOT acyclic (it's not a tree), is fairly sparse (about 1 edges for 2500 nodes), and changes occasionally. I

Re: Efficiently storing a directed graph

2008-03-01 Thread Peter Brawley
_handledLocations.Add(_locationToProcess); } return _shortestPaths; } Thanks Martin- - Original Message - Wrom: PKYLEJGDGVCJVTLBXFGGMEPYOQKEDOTWFAOBUZXUWLSZL To: mysql@lists.mysql.com Sent: Saturday, March 01, 2008 7:19 PM Subject: Re: Efficiently storing a directed graph Kelly, I'm