networkx 2.8.2 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
edge_boundary(G, nbunch1, nbunch2=None, data=False, keys=False, default=None)

The edge boundary of a set S with respect to a set T is the set of edges (u, v) such that u is in S and v is in T. If T is not specified, it is assumed to be the set of all nodes not in S.

Notes

Any element of nbunch that is not in the graph G will be ignored.

:None:None:`nbunch1` and :None:None:`nbunch2` are usually meant to be disjoint, but in the interest of speed and generality, that is not required here.

Parameters

G : NetworkX graph
nbunch1 : iterable

Iterable of nodes in the graph representing the set of nodes whose edge boundary will be returned. (This is the set S from the definition above.)

nbunch2 : iterable

Iterable of nodes representing the target (or "exterior") set of nodes. (This is the set T from the definition above.) If not specified, this is assumed to be the set of all nodes in G not in :None:None:`nbunch1`.

keys : bool

This parameter has the same meaning as in MultiGraph.edges .

data : bool or object

This parameter has the same meaning as in MultiGraph.edges .

default : object

This parameter has the same meaning as in MultiGraph.edges .

Returns

iterator

An iterator over the edges in the boundary of :None:None:`nbunch1` with respect to :None:None:`nbunch2`. If keys , :None:None:`data`, or default are specified and G is a multigraph, then edges are returned with keys and/or data, as in MultiGraph.edges .

Returns the edge boundary of :None:None:`nbunch1`.

Examples

See :

Back References

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

networkx.algorithms.cuts.volume

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/boundary.py#16
type: <class 'function'>
Commit: