Brush C++ API
A flexible interpretable machine learning framework
Loading...
Searching...
No Matches
module.cpp
Go to the documentation of this file.
1/* Brush
2
3module.cpp : Python interface to Brush classes and functions, using pybind11
4
5copyright 2021 William La Cava
6authors: William La Cava and Joseph D. Romano
7license: GNU/GPL v3
8*/
9
10#define STRINGIFY(x) #x
11#define MACRO_STRINGIFY(x) STRINGIFY(x)
12
13#include "module.h"
14
15namespace py = pybind11;
16
17// forward declarations ------------------
18
19// non-templated bindings
20void bind_params(py::module &);
21void bind_dataset(py::module &);
22void bind_search_space(py::module &);
23void bind_fitness(py::module &);
24
25// templated bindings
26void bind_programs(py::module &);
27void bind_variations(py::module &);
28void bind_selections(py::module &);
29void bind_individuals(py::module &);
30void bind_engines(py::module &);
31void bind_evaluators(py::module &);
32
34
35#ifdef VERSION_INFO
36 m.attr("__version__") = MACRO_STRINGIFY(VERSION_INFO);
37#else
38 m.attr("__version__") = "dev"; // TODO: uve version file
39#endif
40 // data structures
41 bind_params(m);
42 bind_dataset(m);
44 bind_fitness(m);
45
46 // TODO: create a submodule for them
50
51 // solutions
52 py::module_ m2 = m.def_submodule("program", "Contains Program classes.");
54
55 py::module_ m3 = m.def_submodule("individual", "Contains Individual classes.");
57
58 py::module_ m4 = m.def_submodule("engine", "Learning engines.");
60}
void bind_engine(py::module &m, string name)
#define MACRO_STRINGIFY(x)
Definition module.cpp:11
void bind_fitness(py::module &)
void bind_variations(py::module &)
void bind_programs(py::module &)
void bind_dataset(py::module &)
void bind_search_space(py::module &)
void bind_selections(py::module &)
PYBIND11_MODULE(_brush, m)
Definition module.cpp:33
void bind_engines(py::module &)
void bind_individuals(py::module &)
void bind_params(py::module &)
void bind_evaluators(py::module &)