Graph and Network Library for Haskell
Asked Answered
Z

3

9

Any suggestions for a good graph and network library for Haskell ?

I'm looking on functionality something like which networkx library has for Python.

Ziska answered 6/2, 2013 at 8:25 Comment(0)
S
4

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.

Sasaki answered 6/2, 2013 at 9:24 Comment(0)
E
4

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!

Earthenware answered 6/2, 2013 at 9:26 Comment(2)
containers comes with GHC, and unless one knows very well what one's doing, one should stick with the version that came with GHC.Torras
That's a good point, I'll remove the suggestion from my answer.Earthenware
B
2

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.

Budbudapest answered 14/7, 2014 at 12:38 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.