| 214 | } |
| 215 | |
| 216 | py::tuple py_find_min_global2 ( |
| 217 | py::object f, |
| 218 | py::list bound1, |
| 219 | py::list bound2, |
| 220 | unsigned long num_function_calls, |
| 221 | double solver_epsilon = 0 |
| 222 | ) |
| 223 | { |
| 224 | DLIB_CASSERT(len(bound1) == len(bound2)); |
| 225 | |
| 226 | auto func = [&](const matrix<double,0,1>& x) |
| 227 | { |
| 228 | return call_func(f, x); |
| 229 | }; |
| 230 | |
| 231 | auto result = find_min_global(func, list_to_mat(bound1), list_to_mat(bound2), max_function_calls(num_function_calls), solver_epsilon); |
| 232 | |
| 233 | return py::make_tuple(mat_to_list(result.x),result.y); |
| 234 | } |
| 235 | |
| 236 | // ---------------------------------------------------------------------------------------- |
| 237 |
nothing calls this directly
no test coverage detected