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
596201e7
Commit
596201e7
authored
Jan 26, 2013
by
Davis King
Browse files
clarified print statements
parent
9d576281
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
examples/optimization_ex.cpp
examples/optimization_ex.cpp
+4
-4
No files found.
examples/optimization_ex.cpp
View file @
596201e7
...
...
@@ -224,7 +224,7 @@ int main()
// printed for each iteration of optimization.
&
rosen
,
&
rosen_derivative
,
starting_point
,
-
1
);
cout
<<
endl
<<
starting_point
<<
endl
;
cout
<<
endl
<<
"rosen solution:
\n
"
<<
starting_point
<<
endl
;
starting_point
=
-
94
,
5.2
;
find_min_using_approximate_derivatives
(
lbfgs_search_strategy
(
10
),
...
...
@@ -279,14 +279,14 @@ int main()
objective_delta_stop_strategy
(
1e-7
),
test_function
(
target
),
starting_point
,
-
1
);
// At this point the correct value of (3,5,1,7) should be found and stored in starting_point
cout
<<
starting_point
<<
endl
;
cout
<<
"test_function solution:
\n
"
<<
starting_point
<<
endl
;
// Now lets try it again with the conjugate gradient algorithm.
starting_point
=
-
4
,
5
,
99
,
3
;
find_min_using_approximate_derivatives
(
cg_search_strategy
(),
objective_delta_stop_strategy
(
1e-7
),
test_function
(
target
),
starting_point
,
-
1
);
cout
<<
starting_point
<<
endl
;
cout
<<
"test_function solution:
\n
"
<<
starting_point
<<
endl
;
...
...
@@ -303,7 +303,7 @@ int main()
1e-6
,
// stopping trust region radius
100
// max number of objective function evaluations
);
cout
<<
starting_point
<<
endl
;
cout
<<
"test_function solution:
\n
"
<<
starting_point
<<
endl
;
}
catch
(
std
::
exception
&
e
)
...
...
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