문제

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top