pmneila / PyMaxflow

Python library for creating flow networks and computing the maxflow/mincut (aka graph-cuts for Python)

Home Page:http://pmneila.github.io/PyMaxflow/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unidirectional Edge

tkhan1994 opened this issue · comments

Hi,
I was wondering if it is possible to add a unidirectional edge between two nodes using the add_edge method?

Thanks

Hi,

Yes. Just set the capacity to 0:

g.add_edge(nodes[0], nodes[1], 1, 0)