rustworkx.PyGraph.update_edge_by_index#

PyGraph.update_edge_by_index(edge_index, edge, /)#

Update an edge’s weight/data payload in place by the edge index

Parameters:
  • edge_index (int) – The index for the edge

  • edge (object) – The data payload/weight to update the edge with

Raises:

IndexError – when there is no edge present with the provided index