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.PyDAG.add_nodes_from#

PyDAG.add_nodes_from(obj_list, /)#

Add new nodes to the graph.

Parameters:

obj_list (iterable[S]) – An iterable of Python objects to attach to the new nodes

Returns:

A list of indices of the newly created nodes

Return type:

NodeIndices