networkx 2.8.2 Pypi GitHub Homepage
Other Docs
ParametersReturns
average_node_connectivity(G, flow_func=None)

The average connectivity :None:None:`\bar{\kappa}` of a graph G is the average of local node connectivity over all pairs of nodes of G .

$$\bar{\kappa}(G) = \frac{\sum_{u,v} \kappa_{G}(u,v)}{{n \choose 2}}$$

Parameters

G : NetworkX graph

Undirected graph

flow_func : function

A function for computing the maximum flow among a pair of nodes. The function has to accept at least three parameters: a Digraph, a source node, and a target node. And return a residual network that follows NetworkX conventions (see maximum_flow for details). If flow_func is None, the default maximum flow function ( edmonds_karp ) is used. See local_node_connectivity for details. The choice of the default function may change from version to version and should not be relied on. Default value: None.

Returns

K : float

Average node connectivity

Returns the average connectivity of a graph G.

See Also

edge_connectivity

meth

edmonds_karp

meth

local_node_connectivity

meth

maximum_flow

meth

node_connectivity

meth

preflow_push

meth

shortest_augmenting_path

meth

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /networkx/algorithms/connectivity/connectivity.py#352
type: <class 'function'>
Commit: