rustworkx.PyDAG.add_child#
- PyDAG.add_child(parent, obj, edge, /)#
Add a new child node to the graph.
This will create a new node on the graph and add an edge from the parent to that new node.
- Parameters:
parent (int) – The index for the parent node
obj – The python object to attach to the node
edge – The python object to attach to the edge
- Returns:
The index of the newly created child node
- Return type:
int