
weights is an array containing theĬapacities of the edges starting at every node. The grid of nodes is given by nodeids, that contains the add_grid_edges ( self, ndarray nodeids, weights=1, structure=None, int symmetric=0 ) ¶Īdd edges to a grid of nodes in a structured manner. Important: see note about the constructor.

To add edges between a non-terminal node and terminal nodes, see add_edge ( self, int i, int j, long capacity, long rcapacity ) ¶Īdds a bidirectional edge between nodes i and j with the See help(type(self)) for accurate signature. Note that these classes can be accessed with a template-like syntax using theĭictionary maxflow.Graph: maxflow.Graph and Includes the documentation of just one of these classes. Only differ in the data type of the flow network.

The module maxflow has the classes maxflow.GraphInt and If you use this library for research purposes, you must cite the aforementioned
