Created
October 12, 2024 23:48
-
-
Save masouduut94/3e69cf50aece65cc39a033ca5d59cc98 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <pybind11/pybind11.h> | |
#include <pybind11/stl.h> | |
#include "cpp_evaluator.h" // Include your evaluator C++ module | |
namespace py = pybind11; | |
PYBIND11_MODULE(cpp_evaluator, m) { | |
py::class_<CppEvaluator>(m, "CppEvaluator") | |
.def(py::init<const std::string&, const std::string&>()) // Constructor binding | |
.def("evaluate", &CppEvaluator::evaluate); // Bind evaluate method | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment