rustworkx.PyDAG.add_node#

PyDAG.add_node(obj, /)#

在图中添加一个新节点。

Parameters:

obj (S) – 要附加到节点的 Python 对象

Returns:

新创建节点的索引

Return type:

整数