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
943408d2
Commit
943408d2
authored
Jul 26, 2020
by
Davis King
Browse files
Allow forwarding initial function evaluations into find_max_global()
parent
5a80ca9e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
268 additions
and
156 deletions
+268
-156
dlib/global_optimization/find_max_global.h
dlib/global_optimization/find_max_global.h
+131
-84
dlib/global_optimization/find_max_global_abstract.h
dlib/global_optimization/find_max_global_abstract.h
+132
-72
dlib/test/global_optimization.cpp
dlib/test/global_optimization.cpp
+5
-0
No files found.
dlib/global_optimization/find_max_global.h
View file @
943408d2
This diff is collapsed.
Click to expand it.
dlib/global_optimization/find_max_global_abstract.h
View file @
943408d2
This diff is collapsed.
Click to expand it.
dlib/test/global_optimization.cpp
View file @
943408d2
...
...
@@ -172,6 +172,11 @@ namespace
DLIB_TEST_MSG
(
max
(
abs
(
true_x
-
result
.
x
))
<
1e-5
,
max
(
abs
(
true_x
-
result
.
x
)));
print_spinner
();
result
=
find_max_global
(
rosen
,
{
0.1
,
0.1
},
{
2
,
2
},
max_function_calls
(
100
),
0
,
{
function_evaluation
({
1.1
,
0.9
},
rosen
({
1.1
,
0.9
}))});
dlog
<<
LINFO
<<
"rosen: "
<<
trans
(
result
.
x
);
DLIB_TEST_MSG
(
max
(
abs
(
true_x
-
result
.
x
))
<
1e-5
,
max
(
abs
(
true_x
-
result
.
x
)));
print_spinner
();
result
=
find_max_global
(
rosen
,
{
0.1
,
0.1
},
{
2
,
2
},
std
::
chrono
::
seconds
(
5
));
dlog
<<
LINFO
<<
"rosen: "
<<
trans
(
result
.
x
);
DLIB_TEST_MSG
(
max
(
abs
(
true_x
-
result
.
x
))
<
1e-5
,
max
(
abs
(
true_x
-
result
.
x
)));
...
...
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