Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
5623810b
Commit
5623810b
authored
Apr 27, 2019
by
Davis King
Browse files
Fixed global_function_search's initialization being wrong if explicitly
given an empty list of initial function evaluations.
parent
67d22c48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
dlib/global_optimization/global_function_search.cpp
dlib/global_optimization/global_function_search.cpp
+1
-1
No files found.
dlib/global_optimization/global_function_search.cpp
View file @
5623810b
...
...
@@ -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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment