rustworkx.PyGraph.update_edge¶
- PyGraph.update_edge(source, target, /, edge)¶
Update an edge’s weight/payload in place
If there are parallel edges in the graph only one edge will be updated. if you need to update a specific edge or need to ensure all parallel edges get updated you should use
update_edge_by_index()instead.- Parameters:
source (int) – The index for the first node
target (int) – The index for the second node
- Raises:
NoEdgeBetweenNodes – When there is no edge between nodes