| 264 | } |
| 265 | |
| 266 | std::shared_ptr<global_function_search> py_global_function_search2 ( |
| 267 | py::list functions, |
| 268 | py::list initial_function_evals, |
| 269 | double relative_noise_magnitude |
| 270 | ) |
| 271 | { |
| 272 | std::vector<function_spec> specs; |
| 273 | for (const auto& i : functions) |
| 274 | specs.emplace_back(i.cast<function_spec>()); |
| 275 | |
| 276 | std::vector<std::vector<function_evaluation>> func_evals; |
| 277 | for (const auto& i : initial_function_evals) |
| 278 | { |
| 279 | std::vector<function_evaluation> evals; |
| 280 | for (const auto& j : i) |
| 281 | { |
| 282 | evals.emplace_back(j.cast<function_evaluation>()); |
| 283 | } |
| 284 | func_evals.emplace_back(std::move(evals)); |
| 285 | } |
| 286 | |
| 287 | return std::make_shared<global_function_search>(specs, func_evals, relative_noise_magnitude); |
| 288 | } |
| 289 | |
| 290 | function_evaluation py_function_evaluation( |
| 291 | const py::list& x, |
nothing calls this directly
no test coverage detected