Re: [Haskell] [Newbie] Data structure for Dijkstra's algorithm

2005-02-15 Thread Pedro Vasconcelos
On Mon, 14 Feb 2005 15:00:17 +0100 RCP-Software [EMAIL PROTECTED] wrote: For input and output I need an appropriate graph representation. It should be as simple to implement as possible - speed and memory consumption does not matter. The graph consists of vertices (including the source

Re: [Haskell] [Newbie] Data structure for Dijkstra's algorithm

2005-02-15 Thread Josef Svenningsson
On Mon, 14 Feb 2005 12:27:51 -0500, robert dockins [EMAIL PROTECTED] wrote: [Dijkstra's] algorithm relies pretty fundamentally on mutability, which makes it a less than wonderful fit for a functional language. If you want to use this algorithm in particular, I would recommend a mutable

[Haskell] [Newbie] Data structure for Dijkstra's algorithm

2005-02-14 Thread RCP-Software
Hi! I am new to functional Programming and need some advice. I want to implement Dijkstra's algorithm for the shortest path problem. The algorithm calculates the shortest path from a single vertex in a directed graph to any other connected vertex (

Re: [Haskell] [Newbie] Data structure for Dijkstra's algorithm

2005-02-14 Thread robert dockins
This algorithm relies pretty fundamentally on mutability, which makes it a less than wonderful fit for a functional language. If you want to use this algorithm in particular, I would recommend a mutable array indexed on the vertex pair (u,v). See:

Re: [Haskell] [Newbie] Data structure for Dijkstra's algorithm

2005-02-14 Thread ajb
G'day all. Quoting robert dockins [EMAIL PROTECTED]: This algorithm relies pretty fundamentally on mutability, which makes it a less than wonderful fit for a functional language. Right, which makes me wonder if this is the algorithm that you really want. Does it have to be Dijkstra's