* @brief Lists children of the Node and the ID of the child's input linked to the current Node.
* @details The parent vector size matches the number of outputs of the node.
* Each sub-vector size will match the number of children connected to the n-th output (i.e. if 3 nodes are connected to the 3rd output parent_vec[3].size() == 3).
Clone the Node and its Operator. The new Node has no connection.
)mydelimiter")
.def("type",&Node::type,
R"mydelimiter(
Type of the node.
...
...
@@ -72,7 +75,7 @@ void init_Node(py::module& m) {
R"mydelimiter(
Link another Node to an output of the current Node.
:param other_node: Pointer to the other Node.
:param other_node: Pointer to the other Node that will be given as a child to the current Node
:type other_node: :py:class: Node
:param out_id: ID of the output of the current Node to connect to the other Node. (If Node has 1 output max ID is 0). Default to 0.
:type out_id: int
...
...
@@ -116,11 +119,11 @@ void init_Node(py::module& m) {
.def("input",&Node::input,py::arg("in_id"),
R"mydelimiter(
Get the parent Node and the associated output index connected to the i-th input of the current Node.
Get the parent Node and the associated output index connected to the specified input of the current Node.
:param in_id: input index of the current Node object.
:type in_id: int
:return: i-th connection. When an input is not linked to any parent, the default value is (None, default_index)
:return: The parent Node and the corresponding output index of the specified input of the current Node. When an input is not linked to any parent, the default value is (None, 65535)
:rtype: tuple[Node, int]
)mydelimiter")
...
...
@@ -128,7 +131,7 @@ void init_Node(py::module& m) {
R"mydelimiter(
Get, for each output of the Node, a list of the children Node and the associated input index connected to it.
:return: List of a list of connections. When an output is not linked to any child, its list a empty.
:return: List of a list of connections. When an output is not linked to any child, its list a empty.
:rtype: list[list[tuple[Node, int]]]
)mydelimiter")
...
...
@@ -138,13 +141,14 @@ void init_Node(py::module& m) {
:param out_id: input index of the current Node object.
:type out_id: int
:return: i-th connection. When an input is not linked to any parent, the default value is (None, default_index)
:return: List of Nodes and their inputs that are connected to the specified output.
When an input is not linked to any parent, the default value is (None, default_index)
:rtype: list[tuple[Node, int]]
)mydelimiter")
.def("get_nb_inputs",&Node::nbInputs,
R"mydelimiter(
Number of inputs.
Number of inputs of the Node.
:rtype: int
)mydelimiter")
...
...
@@ -159,21 +163,26 @@ void init_Node(py::module& m) {