rustworkx.PyDAG.add_nodes_from#

PyDAG.add_nodes_from(obj_list, /)#

Add new nodes to the graph.

Parameters:

obj_list (list) – A list of python objects to attach to the graph as new nodes

Returns:

A list of int indices of the newly created nodes

Return type:

NodeIndices