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.

  • source (int) – The index for the first node

  • target (int) – The index for the second node


NoEdgeBetweenNodes – When there is no edge between nodes