1

Is there a fast cython/python library for doing maximum flow / minimum cut computations (preferably with Boykov-Kolmogorov) that has a BSD license?

A light-weight C library would also be useful.

fuglede
  • 17,388
  • 2
  • 54
  • 99
Andreas Mueller
  • 27,470
  • 8
  • 62
  • 74

3 Answers3

2

There is Graph-Tool which is GPL licensed or Python-Graph which is MIT licensed, depending on what you can live with.

Christian Witts
  • 11,375
  • 1
  • 33
  • 46
  • Thanks for your answer. Do you have any experience with Python-Graph wrt speed? – Andreas Mueller May 30 '12 at 11:17
  • I can't comment on the speed of Python-Graph, but I do find Graph-Tool to be fast enough for me. If you have speed issues with Python-Graph you can always look at compilers like Psyco or PyPy to execute the code faster. – Christian Witts May 30 '12 at 11:49
1

How about NetworkX? Check out their flow-related algorithms.

The license is BSD

Eli Bendersky
  • 263,248
  • 89
  • 350
  • 412
1

As detailed in this answer which also includes a simple benchmark, SciPy -- which is licensed under BSD-3 -- includes an implementation as of 1.4.0 as scipy.sparse.csgraph.maximum_flow.

fuglede
  • 17,388
  • 2
  • 54
  • 99