diff --git a/src/python_bindings/bindings.cpp b/src/python_bindings/bindings.cpp index 74732d1691..0043758654 100644 --- a/src/python_bindings/bindings.cpp +++ b/src/python_bindings/bindings.cpp @@ -12,6 +12,7 @@ #include "dynamic/bind_dynamic_fd_verification.h" #include "fd/bind_fd.h" #include "fd/bind_fd_verification.h" +#include "gfd/bind_gfd_mining.h" #include "gfd/bind_gfd_verification.h" #include "ind/bind_ind.h" #include "mfd/bind_mfd_verification.h" @@ -38,10 +39,13 @@ PYBIND11_MODULE(desbordante, module, pybind11::mod_gil_not_used()) { el::Loggers::reconfigureAllLoggers(conf); } + // clang-format off for (auto bind_func : {BindMainClasses, BindDataTypes, BindFd, BindCfd, BindAr, BindUcc, BindAc, BindOd, BindNd, BindFdVerification, BindMfdVerification, BindUccVerification, BindStatistics, BindInd, - BindGfdVerification, BindSplit, BindDynamicFdVerification, BindNdVerification, BindSFD}) { + BindGfdVerification, BindSplit, BindDynamicFdVerification, BindNdVerification, BindSFD, + BindGfdMining}) { + // clang-format on bind_func(module); } } diff --git a/src/python_bindings/gfd/bind_gfd_mining.cpp b/src/python_bindings/gfd/bind_gfd_mining.cpp new file mode 100644 index 0000000000..eba1f62129 --- /dev/null +++ b/src/python_bindings/gfd/bind_gfd_mining.cpp @@ -0,0 +1,17 @@ +#include "gfd/bind_gfd_mining.h" + +#include +#include + +#include "algorithms/gfd/gfd_miner.h" +#include "py_util/bind_primitive.h" + +namespace python_bindings { +void BindGfdMining(pybind11::module_& main_module) { + using namespace algos; + + auto gfd_module = main_module.def_submodule("gfd_mining"); + + BindPrimitiveNoBase(gfd_module, "GfdMiner").def("get_gfds", &GfdMiner::GfdList); +} +} // namespace python_bindings diff --git a/src/python_bindings/gfd/bind_gfd_mining.h b/src/python_bindings/gfd/bind_gfd_mining.h new file mode 100644 index 0000000000..2edfcb2ec0 --- /dev/null +++ b/src/python_bindings/gfd/bind_gfd_mining.h @@ -0,0 +1,7 @@ +#pragma once + +#include + +namespace python_bindings { +void BindGfdMining(pybind11::module_& main_module); +} // namespace python_bindings