| 190 | // ---------------------------------------------------------------------------------------- |
| 191 | |
| 192 | py::tuple py_find_min_global ( |
| 193 | py::object f, |
| 194 | py::list bound1, |
| 195 | py::list bound2, |
| 196 | py::list is_integer_variable, |
| 197 | unsigned long num_function_calls, |
| 198 | double solver_epsilon = 0 |
| 199 | ) |
| 200 | { |
| 201 | DLIB_CASSERT(len(bound1) == len(bound2)); |
| 202 | DLIB_CASSERT(len(bound1) == len(is_integer_variable)); |
| 203 | |
| 204 | auto func = [&](const matrix<double,0,1>& x) |
| 205 | { |
| 206 | return call_func(f, x); |
| 207 | }; |
| 208 | |
| 209 | auto result = find_min_global(func, list_to_mat(bound1), list_to_mat(bound2), |
| 210 | list_to_bool_vector(is_integer_variable), max_function_calls(num_function_calls), |
| 211 | solver_epsilon); |
| 212 | |
| 213 | return py::make_tuple(mat_to_list(result.x),result.y); |
| 214 | } |
| 215 | |
| 216 | py::tuple py_find_min_global2 ( |
| 217 | py::object f, |
nothing calls this directly
no test coverage detected