MCPcopy Create free account
hub / github.com/davisking/dlib / py_find_max_global2

Function py_find_max_global2

tools/python/src/global_optimization.cpp:170–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

168}
169
170py::tuple py_find_max_global2 (
171 py::object f,
172 py::list bound1,
173 py::list bound2,
174 unsigned long num_function_calls,
175 double solver_epsilon = 0
176)
177{
178 DLIB_CASSERT(len(bound1) == len(bound2));
179
180 auto func = [&](const matrix<double,0,1>& x)
181 {
182 return call_func(f, x);
183 };
184
185 auto result = find_max_global(func, list_to_mat(bound1), list_to_mat(bound2), max_function_calls(num_function_calls), solver_epsilon);
186
187 return py::make_tuple(mat_to_list(result.x),result.y);
188}
189
190// ----------------------------------------------------------------------------------------
191

Callers

nothing calls this directly

Calls 7

lenFunction · 0.85
call_funcFunction · 0.85
find_max_globalFunction · 0.85
list_to_matFunction · 0.85
make_tupleFunction · 0.85
mat_to_listFunction · 0.85
max_function_callsClass · 0.50

Tested by

no test coverage detected