Skip to content
Snippets Groups Projects
Commit 309b215e authored by Octave Perrin's avatar Octave Perrin
Browse files

back to graphview

parent 62f4fa5a
No related branches found
No related tags found
No related merge requests found
...@@ -76,32 +76,51 @@ void init_GraphView(py::module& m) { ...@@ -76,32 +76,51 @@ void init_GraphView(py::module& m) {
.def("set_root_node", &GraphView::setRootNode, py::arg("node"), .def("set_root_node", &GraphView::setRootNode, py::arg("node"),
R"mydelimiter( R"mydelimiter(
TODO Changes the rootNode of the GraphView
:param node: The Node of the GraphView that will become the new rootNode
:type node: Node
)mydelimiter") )mydelimiter")
.def("__repr__", &GraphView::repr, .def("__repr__", &GraphView::repr,
R"mydelimiter( R"mydelimiter(
TODO returns information about the graphView: its name, number of nodes, of inputs and of outputs.
:return: a chain of caracter describing the graphView
:rtype: string
)mydelimiter") )mydelimiter")
.def("__len__", [](const GraphView& g){ return g.getNodes().size(); }, .def("__len__", [](const GraphView& g){ return g.getNodes().size(); },
R"mydelimiter( R"mydelimiter(
TODO returns the number of Nodes of the GraphView
:param g: The observed graphView
:type g: graphView
:return: the number of Nodes of the graphView g
:rtype: int
)mydelimiter") )mydelimiter")
.def("log_outputs", &GraphView::logOutputs, py::arg("path"), .def("log_outputs", &GraphView::logOutputs, py::arg("path"),
R"mydelimiter( R"mydelimiter(
TODO Logs the output of all nodes of the graph in a directory
In the specified directory, it will create a subdirectory for each Node of the GraphView
In that sub-directory, each output of the Node will be saved in a different .log file
:param path: The path to the folder where we wish to stock the logs
:type path: string
)mydelimiter") )mydelimiter")
.def("get_ordered_inputs", &GraphView::getOrderedInputs, .def("get_ordered_inputs", &GraphView::getOrderedInputs,
R"mydelimiter( R"mydelimiter(
TODO Get inputs of the current GraphView with their associated id.
The rank of the nodes are their rank in the vector.
:return: The pairs Node, inputId of each input of the graphView
:rtype: List[(Node, int)]
)mydelimiter") )mydelimiter")
.def("get_ordered_outputs", &GraphView::getOrderedOutputs, .def("get_ordered_outputs", &GraphView::getOrderedOutputs,
R"mydelimiter( R"mydelimiter(
TODO Get outputs of the current GraphView with their associated id.
The rank of the nodes are their rank in the vector.
:return: The pairs Node, outputId of each output of the graphView
:rtype: List[(Node, int)]
)mydelimiter") )mydelimiter")
.def("get_output_nodes", &GraphView::outputNodes, .def("get_output_nodes", &GraphView::outputNodes,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment