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.
- PyDAG.insert_node_on_in_edges(node, ref_node, /)#
Insert a node between a reference node and all its predecessor nodes
This essentially iterates over all edges into the reference node specified in the
ref_nodeparameter removes those edges and then adds 2 edges, one from the predecessor of
nodeand the other from
ref_node. The edge payloads for the newly created edges are copied by reference from the original edge that gets removed.
node (int) – The node index to insert between
ref_node (int) – The reference node index to insert