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.incident_edge_index_map#
- PyGraph.incident_edge_index_map(node, /)#
Return the index map of edges incident to a provided node
- 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 mapping and not error.
- Returns:
A mapping of incident edge indices to the tuple
(source, target, data)
. The source endpoint node index in this tuple will always benode
to ensure you can easily identify that the neighbor node is the second element in the tuple for a given edge index.- Return type: