Graphs

Daan Leijen daan@cs.uu.nl
Fri, 22 Feb 2002 11:28:31 +0100


Hi Wojciech,

> I would like to ask you, if you do not know any graph library for
> haskell. I would like to use haskell for prototyping some of
> algorithms on graphs and finite state automata/transducers. In fact
> what I'm looking for is a good (efficient and easy readable) data type
> definition for labeled graphs.

You should take a look at Martin Erwig's functional graph library,
http://www.cs.orst.edu/~erwig/fgl/

And also at David King's and John Launchbury's paper about graphs:
http://www.cse.ogi.edu/~jl/Papers/dfs.ps

I think that both libraries show that Haskell is indeed a very nice
language for prototyping graph algorithms and that they allow you to
specify algorithms in such a way that they match the mathematical definitions 
more closely.

It is probably true that the same algorithm in C++ will be (much?) faster but
it will also take you (much?) more time to code it correctly. i.e. use Haskell
for experimentation!

All the best,
    Daan.


> Thanks,
> 
> Wojtek
> 
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 
>