| 144 | // ---------------------------------------------------------------------------------------- |
| 145 | |
| 146 | py::tuple py_find_max_global ( |
| 147 | py::object f, |
| 148 | py::list bound1, |
| 149 | py::list bound2, |
| 150 | py::list is_integer_variable, |
| 151 | unsigned long num_function_calls, |
| 152 | double solver_epsilon = 0 |
| 153 | ) |
| 154 | { |
| 155 | DLIB_CASSERT(len(bound1) == len(bound2)); |
| 156 | DLIB_CASSERT(len(bound1) == len(is_integer_variable)); |
| 157 | |
| 158 | auto func = [&](const matrix<double,0,1>& x) |
| 159 | { |
| 160 | return call_func(f, x); |
| 161 | }; |
| 162 | |
| 163 | auto result = find_max_global(func, list_to_mat(bound1), list_to_mat(bound2), |
| 164 | list_to_bool_vector(is_integer_variable), max_function_calls(num_function_calls), |
| 165 | solver_epsilon); |
| 166 | |
| 167 | return py::make_tuple(mat_to_list(result.x),result.y); |
| 168 | } |
| 169 | |
| 170 | py::tuple py_find_max_global2 ( |
| 171 | py::object f, |
nothing calls this directly
no test coverage detected