Warning

This documents an unmaintained version of NetworkX. Please upgrade to a maintained version and see the current NetworkX documentation.

Boundary

Routines to find the boundary of a set of nodes.

An edge boundary is a set of edges, each of which has exactly one endpoint in a given set of nodes (or, in the case of directed graphs, the set of edges whose source node is in the set).

A node boundary of a set S of nodes is the set of (out-)neighbors of nodes in S that are outside S.

edge_boundary(G, nbunch1[, nbunch2, data, …])

Returns the edge boundary of nbunch1.

node_boundary(G, nbunch1[, nbunch2])

Returns the node boundary of nbunch1.