Any suggestions for a good graph and network library for Haskell ?
I'm looking on functionality something like which networkx library has for Python.
I've found fgl (also see home page) quite easy to work with. I'm not familiar with networkx, so I don't know how it compares.
There's a graph data-structure in the containers package. You can view the interface for it here.
Additionally, you can search through all of the packages available on the haskell-platform or additional packages through Cabal using Hayoo!
It's more than a year old question, but in case someone looks for the lib - the igraph package provides the bindings to all functions about graph properties of the igraph-C library. It won't compile with the igraph-C versions newer than 0.6.5, because the authors don't have time to maintain it, as Nils Schweinsberg said: Pull requests are wellcome. Also not all functions from the original library have the Haskell bindings, but one can write some using the FFI.
fgl is very beautiful library implementing the functional concept of inductive graphs, but it lacks the functionality of the igraph library: You can create directed/undirected weighted/unweighted graphs and have the algorithms implemented taking that into account.
The igraph package could be a very valuable library for the Haskell community if an experienced haskeller took care of it further.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With