Note

This is the documentation for the current state of the development branch of rustworkx. The documentation or APIs here can change prior to being released.

rustworkx.PyDiGraph.neighbors#

PyDiGraph.neighbors(node, /)#

Get the neighbors (i.e. successors) of a node.

This will return a list of neighbor node indices. This function is equivalent to successor_indices().

Parameters:

node (int) – The index of the node to get the neighbors of

Returns:

A list of the neighbor node indices

Return type:

NodeIndices