This documents the development version of NetworkX. Documentation for the current release can be found here.
node_boundary(G, nbunch1, nbunch2=None)¶
Returns the node boundary of
The node boundary of a set S with respect to a set T is the set of nodes v in T such that for some u in S, there is an edge joining u to v. If T is not specified, it is assumed to be the set of all nodes not in S.
- GNetworkX graph
Iterable of nodes in the graph representing the set of nodes whose node boundary will be returned. (This is the set S from the definition above.)
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
The node boundary of
nbunch1with respect to
Any element of
nbunchthat is not in the graph
Gwill be ignored.
nbunch2are usually meant to be disjoint, but in the interest of speed and generality, that is not required here.