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.PyGraph.out_edge_indices#

PyGraph.out_edge_indices(node, /)#

Return the list of edge indices incident to a provided node.

This method returns the indices of all edges connected to the provided node. In undirected graphs, all edges connected to the node are returned as there is no distinction between incoming and outgoing edges.

Parameters:

node (int) – The node index to get incident edges from. If this node index is not present in the graph this method will return an empty list and not error.

Returns:

A list of the edge indices incident to the node

Return type:

EdgeIndices