networkx 2.8.2 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
all_pairs_node_connectivity(G, nbunch=None, cutoff=None)

Pairwise or local node connectivity between two distinct and nonadjacent nodes is the minimum number of nodes that must be removed (minimum separating cutset) to disconnect them. By Menger's theorem, this is equal to the number of node independent paths (paths that share no nodes other than source and target). Which is what we compute in this function.

This algorithm is a fast approximation that gives an strict lower bound on the actual number of node independent paths between two nodes . It works for both directed and undirected graphs.

Parameters

G : NetworkX graph
nbunch: container :

Container of nodes. If provided node connectivity will be computed only over pairs of nodes in nbunch.

cutoff : integer

Maximum node connectivity to consider. If None, the minimum degree of source or target is used as a cutoff in each pair of nodes. Default value None.

Returns

K : dictionary

Dictionary, keyed by source and target, of pairwise node connectivity

Compute node connectivity between all pairs of nodes.

See Also

local_node_connectivity
node_connectivity

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

networkx.algorithms.approximation.connectivity.local_node_connectivity networkx.algorithms.approximation.connectivity.node_connectivity

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/approximation/connectivity.py#215
type: <class 'function'>
Commit: