NetworkX

Previous topic

networkx.algorithms.boundary.node_boundary

Next topic

networkx.algorithms.boundary.node_boundary

networkx.algorithms.boundary.edge_boundary

networkx.algorithms.boundary.edge_boundary(G, nbunch1, nbunch2=None)

Return the edge boundary.

Edge boundaries are edges that have only one end in the given set of nodes.

Parameters :

G : graph

A networkx graph

nbunch1 : list, container

Interior node set

nbunch2 : list, container

Exterior node set. If None then it is set to all of the nodes in G not in nbunch1.

Returns :

elist : list

List of edges

Notes

Nodes in nbunch1 and nbunch2 that are not in G are ignored.

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