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.insert_node_on_out_edges_multiple#
- PyDAG.insert_node_on_out_edges_multiple(node, ref_nodes, /)#
Insert a node between a list of reference nodes and all their successors
This essentially iterates over all edges out of the reference node specified in the
ref_node
parameter removes those edges and then adds 2 edges, one fromref_node
tonode
and the other fromnode
to the successor ofref_node
. The edge payloads for the newly created edges are copied by reference from the original edge that gets removed.- Parameters:
node (int) – The node index to insert between
ref_nodes (int) – The list of node indices to insert
node
between