Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
6bf4a648
Commit
6bf4a648
authored
Oct 23, 2012
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup
parent
cbbd8447
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
bsp_ex.cpp
examples/bsp_ex.cpp
+2
-2
No files found.
examples/bsp_ex.cpp
View file @
6bf4a648
...
@@ -24,7 +24,7 @@ using namespace dlib;
...
@@ -24,7 +24,7 @@ using namespace dlib;
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
double
f
(
double
x
)
double
f
(
double
x
)
{
{
return
std
::
pow
(
x
-
2.0
,
2.0
);
return
std
::
pow
(
x
-
2.0
,
2.0
);
}
}
...
@@ -83,7 +83,7 @@ void bsp_job_other_nodes (
...
@@ -83,7 +83,7 @@ void bsp_job_other_nodes (
const
double
width
=
right
-
left
;
const
double
width
=
right
-
left
;
const
matrix
<
double
>
values_to_check
=
linspace
(
left
+
l
*
width
,
left
+
r
*
width
,
grid_resolution
);
const
matrix
<
double
>
values_to_check
=
linspace
(
left
+
l
*
width
,
left
+
r
*
width
,
grid_resolution
);
double
best_x
;
double
best_x
=
0
;
double
best_val
=
std
::
numeric_limits
<
double
>::
infinity
();
double
best_val
=
std
::
numeric_limits
<
double
>::
infinity
();
for
(
long
j
=
0
;
j
<
values_to_check
.
size
();
++
j
)
for
(
long
j
=
0
;
j
<
values_to_check
.
size
();
++
j
)
{
{
...
...
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