12

Is there any libraries similar to igraph where I can create a hypergraph. I am working with hypergraph now and wanted to use some HyperGraph libraries to work on.

Ashik Vetrivelu
  • 1,021
  • 1
  • 9
  • 24

2 Answers2

7
  • MGtoolkit and its paper
  • pygraph
  • halp
  • PyMETIS
  • SageMath's implementation, 1, 2. SageMath is not a python library but more like a python distribution (ships python 2.7 currently) which lots of interesting libraries are pre-installed.

I hope we see NetworkX and igraph support also soon.

Ebrahim Byagowi
  • 10,338
  • 4
  • 70
  • 81
3

There's also HyperNetX which is able to represent and visualise hypergraphs.

enter image description here

It seems very accessible. They have a number of nice tutorials on their GitHub page.

However, when working with it I identified some issues:

  • Performance: The library struggles with graphs that have several thousand nodes. I recommend igraph instead, although it does not have explicit support for hypergraphs. It does offer functionality for bipartite graphs, though. I believe if no hyperedge is fully contained in another, you can work with a bipartite graph that is isomorphic to your given hypergraph?
  • I encountered an issue in which the ordering of nodes would not be deterministic, i.e. if you constructed the same graph several times and iterated over the nodes, they would be given to you in different orders. This can probably be worked around.
ngmir
  • 450
  • 6
  • 26
  • 1
    When drawing hyper-graphs of large no. of edges (190 in my case). HyperNetX provides unusable graphs. Is there a way to increase the size of canvas, so things can be visible properly? Thank you – Rohit_ Apr 19 '22 at 15:56