Skip to content
Snippets Groups Projects
Commit 0ac0b9b4 authored by Thibault Allenet's avatar Thibault Allenet
Browse files

GRegex python API doc

parent 0a51e26f
No related branches found
Tags v0.4.0
No related merge requests found
......@@ -17,9 +17,27 @@
namespace py = pybind11;
namespace Aidge {
void init_GRegex(py::module& m){
py::class_<GRegex, std::shared_ptr<GRegex>>(m, "GRegex")
.def(py::init<const std::map<std::string,NodeRegex*>&, std::vector<std::string>&>(), py::arg("nodesRegex"), py::arg("seqRegexps"))
.def("match", &GRegex::match, py::arg("graphToMatch"))
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 seqRegexps: Describe the graph topological pattern. List of Graph Regex as strings.
:type seqRegexps: :py:class: `list`
)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`.
Parameters
----------
:param graphToMatch: The graph to perform the matching algorithm on.
:type graphToMatch: :py:class: `aidge_core.GraphView`
)mydelimiter")
;
}
}
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