BaseNetwork.neighborhood
-
BaseNetwork.
neighborhood
(key, ring=1) Return the nodes in the neighborhood of a node.
- Parameters
key (hashable) – The identifier of the node.
ring (int, optional) – The size of the neighborhood. Default is
1
.
- Returns
list – A list of node identifiers.