Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Graph and Network Library for Haskell

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

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

like image 811
Sibi Avatar asked Feb 06 '13 08:02

Sibi


3 Answers

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.

like image 56
mhwombat Avatar answered Nov 04 '22 16:11

mhwombat


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!

like image 35
Alex Avatar answered Nov 04 '22 16:11

Alex


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.

like image 30
mench Avatar answered Nov 04 '22 16:11

mench