FormDiagram.neighborhood

FormDiagram.neighborhood(key, ring=1)[source]

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.