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.


PyGraph.in_edges(node, /)#

Get the endpoint indices and edge data for all edges of a node.

This will return a list of tuples with the parent index, the node index and the edge data. This can be used to recreate add_edge() calls. As PyGraph is undirected this will return all edges with the second endpoint node index always being node.


node (int) – The index of the node to get the edges for


A list of tuples of the form: (parent_index, node_index, edge_data)`

Return type: