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
8f022c00
Commit
8f022c00
authored
Jul 02, 2014
by
Davis E. King
Browse files
Fixed a bug in find_min_single_variable() I introduced a few hours ago.
parent
cea45407
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
dlib/optimization/optimization_line_search.h
dlib/optimization/optimization_line_search.h
+4
-2
No files found.
dlib/optimization/optimization_line_search.h
View file @
8f022c00
...
...
@@ -649,17 +649,19 @@ namespace dlib
// If the left most points are identical in function value then expand out the
// left a bit, unless it's already at bound or we would drop that left most
// point anyway because it's bad.
if
(
f1
==
f2
&&
f1
<
f3
&&
f
1
!=
begin
)
if
(
f1
==
f2
&&
f1
<
f3
&&
p
1
!=
begin
)
{
p1
=
max
(
p1
-
search_radius
,
begin
);
f1
=
f
(
p1
);
++
f_evals
;
search_radius
*=
2
;
continue
;
}
if
(
f2
==
f3
&&
f3
<
f1
&&
f
3
!=
end
)
if
(
f2
==
f3
&&
f3
<
f1
&&
p
3
!=
end
)
{
p3
=
min
(
p3
+
search_radius
,
end
);
f3
=
f
(
p3
);
++
f_evals
;
search_radius
*=
2
;
continue
;
}
...
...
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