diff --git a/python_binding/graphmatching/pybind_GRegex.cpp b/python_binding/graphmatching/pybind_GRegex.cpp index bda8f72f389f7224a207ff4453509744d23ea296..48d0e19ff22c1480636b67b5bde70bf1caa1f1b5 100644 --- a/python_binding/graphmatching/pybind_GRegex.cpp +++ b/python_binding/graphmatching/pybind_GRegex.cpp @@ -20,22 +20,21 @@ void init_GRegex(py::module& m){ py::class_<GRegex, std::shared_ptr<GRegex>>(m, "GRegex", "GRegex class combines a Node Regex and a list of Graph Regex that together describes a graph pattern as a graph regular expression. GRegex find patterns in a given graph that matches the graph regular expression.") .def(py::init<const std::map<std::string,NodeRegex*>&, std::vector<std::string>&>(), py::arg("nodesRegex"), py::arg("seqRegexps"), R"mydelimiter( Constructor of GRegex - - Parameters - ---------- - :param nodesRegex: Describe the conditions an operator has to fulfill. Dictionnary mapping a string (keys) to :py:class:`aidge_core.NodeRegex` (values). - :type nodesRegex: :py:class: `Dict` + + :param nodesRegex: Describe the conditions an operator has to fulfill. + :type nodesRegex: Dict[str,:py:class:`aidge_core.NodeRegex`] :param seqRegexps: Describe the graph topological pattern. List of Graph Regex as strings. - :type seqRegexps: :py:class: `list` + :type seqRegexps: List[str] )mydelimiter") .def("match", &GRegex::match, py::arg("graphToMatch"), R"mydelimiter( - Launch the graph matching algorithm on a given graph. Returns the matched graph patterns in a :py:class: `aidge_core.Match`. + Launch the graph matching algorithm on a given graph. - Parameters - ---------- :param graphToMatch: The graph to perform the matching algorithm on. - :type graphToMatch: :py:class: `aidge_core.GraphView` + :type graphToMatch: :py:class:`aidge_core.GraphView` + + :returns: Matched graph patterns. + :rtype: :py:class:`aidge_core.Match` )mydelimiter") ; diff --git a/python_binding/graphmatching/pybind_Match.cpp b/python_binding/graphmatching/pybind_Match.cpp index 600d39208e309ef64d9803c39cf23636d1a64869..a2d2654f40ed50e20e8761be57e2c8bb98ce4e3b 100644 --- a/python_binding/graphmatching/pybind_Match.cpp +++ b/python_binding/graphmatching/pybind_Match.cpp @@ -19,13 +19,16 @@ void init_Match(py::module& m){ py::class_<Match, std::shared_ptr<Match>>(m, "Match", "Match class stores the matched patterns resulting from a graph matching query. A matched pattern is the combinaison of the graph pattern start nodes and the set of all the nodes in the matched pattern (including the start nodes)") .def(py::init<>()) .def("get_nb_match", &Match::getNbMatch, R"mydelimiter( - The number of graph patterns matched + :returns: The number of graph patterns matched + :rtype: int )mydelimiter") .def("get_start_nodes", &Match::getStartNodes, R"mydelimiter( - All matched graph patterns start nodes + :returns: All matched graph patterns start nodes + :rtype: List[List[:py:class:`aidge_core.Nodes`]] )mydelimiter") .def("get_match_nodes", &Match::getMatchNodes, R"mydelimiter( - All matched graph patterns sets of matched nodes + :returns: All matched graph patterns sets of matched nodes + :rtype: List[Set[:py:class:`aidge_core.Nodes`]] )mydelimiter"); } } diff --git a/python_binding/graphmatching/pybind_NodeRegex.cpp b/python_binding/graphmatching/pybind_NodeRegex.cpp index 6bbb74764afafbce3e3356027212c121895e4533..034987f9ccae200a1b8877ecd8b3e878c84e8fc3 100644 --- a/python_binding/graphmatching/pybind_NodeRegex.cpp +++ b/python_binding/graphmatching/pybind_NodeRegex.cpp @@ -15,14 +15,12 @@ namespace py = pybind11; namespace Aidge { void init_NodeRegex(py::module& m){ - py::class_<NodeRegex, std::shared_ptr<NodeRegex>>(m, "NodeRegex", "NodeRegex class describes a condition to test on any operator. Current version only tests the type of the operator.") + py::class_<NodeRegex, std::shared_ptr<NodeRegex>>(m, "NodeRegex", "NodeRegex class describes a condition to test on any operator. Current version only supports testing the type of the operator.") .def(py::init<const std::string>(), py::arg("condition"), R"mydelimiter( Constructor of NodeRegex - Parameters - ---------- - :param condition: Condition to be fulfilled by an operator. Currently supported conditions are only the operator types. - :type condition: `string` + :param condition: Condition to be fulfilled by an operator. + :type condition: str )mydelimiter") ;