Commit 5623810b authored by Davis King's avatar Davis King

Fixed global_function_search's initialization being wrong if explicitly

given an empty list of initial function evaluations.
parent 67d22c48
......@@ -629,7 +629,7 @@ namespace dlib
{
functions[i]->ub = upper_bound_function(initial_function_evals[i], relative_noise_magnitude);
if (initial_function_evals.size() != 0)
if (initial_function_evals[i].size() != 0)
{
auto best = max_scoring_element(initial_function_evals[i], [](const function_evaluation& e) { return e.y; }).first;
functions[i]->best_objective_value = best.y;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment