For using igraph from Python
Home  Trees  Indices  Help 



object +  clustering.Clustering +  clustering.VertexClustering +  Cut +  Flow
A flow of a given graph.
This is a simple class used to represent flows returned by Graph.maxflow. It has the following attributes:
graph
 the graph on which this flow is defined
value
 the value (capacity) of the flow
flow
 the flow values on each edge. For directed
graphs, this is simply a list where element i
corresponds to the flow on edge i. For undirected
graphs, the direction of the flow is not constrained (since the edges
are undirected), hence positive flow always means a flow from the
smaller vertex ID to the larger, while negative flow means a flow
from the larger vertex ID to the smaller.
cut
 edge IDs in the minimal cut corresponding to the
flow.
partition
 vertex IDs in the parts created after
removing edges in the cut
es
 an edge selector restricted to the edges in the
cut.
This class is usually not instantiated directly, everything is taken care of by Graph.maxflow.
Examples:
>>> from igraph import Graph >>> g = Graph.Ring(20) >>> mf = g.maxflow(0, 10) >>> print mf.value 2.0 >>> mf.es["color"] = "red"








Inherited from Inherited from Inherited from Inherited from 


Inherited from 


Inherited from 


flow Returns the flow values for each edge. 

Inherited from Inherited from Inherited from Inherited from 

Initializes the flow. This should not be called directly, everything is taken care of by Graph.maxflow.

repr(x)

str(x)


flowReturns the flow values for each edge. For directed graphs, this is simply a list where element i corresponds to the flow on edge i. For undirected graphs, the direction of the flow is not constrained (since the edges are undirected), hence positive flow always means a flow from the smaller vertex ID to the larger, while negative flow means a flow from the larger vertex ID to the smaller.

Home  Trees  Indices  Help 


Generated by Epydoc 3.0.1 on Fri May 10 10:51:14 2019  http://epydoc.sourceforge.net 