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.add_edges_from_no_data#

PyGraph.add_edges_from_no_data(obj_list, /)#

Add new edges to the graph without python data.

Parameters:

obj_list (iterable) – An iterable of tuples of the form (parent, child) to attach to the graph. parent and child are integer indices describing where an edge should be added. Unlike add_edges_from() there is no data payload and when the edge is created None will be used.

If multigraph is False and an edge already exists between node_a and node_b the weight/payload of that existing edge will be updated to be None.

Returns:

A list of int indices of the newly created edges

Return type:

list