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
a07590a7
Commit
a07590a7
authored
Jan 20, 2013
by
Davis King
Browse files
made unit test more robust
parent
ed9bd637
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
dlib/test/cca.cpp
dlib/test/cca.cpp
+4
-4
No files found.
dlib/test/cca.cpp
View file @
a07590a7
...
...
@@ -172,7 +172,7 @@ namespace
// non-matching pairs of projections.
const
double
corr_rot1_error
=
max
(
abs
(
compute_correlations
(
rm_zeros
(
L
*
rotate
<
0
,
1
>
(
Ltrans
)),
rm_zeros
(
R
*
Rtrans
))));
dlog
<<
LINFO
<<
"corr_rot1_error: "
<<
corr_rot1_error
;
DLIB_TEST
(
std
::
abs
(
corr_rot1_error
)
<
1e-1
1
);
DLIB_TEST
(
std
::
abs
(
corr_rot1_error
)
<
1e-1
0
);
}
// Matching projection directions should be correlated with the amount of
// correlation indicated by the return value of cca().
...
...
@@ -191,7 +191,7 @@ namespace
// non-matching pairs of projections.
const
double
corr_rot1_error
=
max
(
abs
(
compute_correlations
(
rm_zeros
(
L
*
rotate
<
0
,
1
>
(
Ltrans
)),
rm_zeros
(
R
*
Rtrans
))));
dlog
<<
LINFO
<<
"corr_rot1_error: "
<<
corr_rot1_error
;
DLIB_TEST
(
std
::
abs
(
corr_rot1_error
)
<
1e-1
1
);
DLIB_TEST
(
std
::
abs
(
corr_rot1_error
)
<
1e-1
0
);
}
// Matching projection directions should be correlated with the amount of
// correlation indicated by the return value of cca().
...
...
@@ -232,7 +232,7 @@ namespace
// non-matching pairs of projections.
const
double
corr_rot1_error
=
max
(
abs
(
compute_correlations
(
rm_zeros
(
L
*
rotate
<
0
,
1
>
(
Ltrans
)),
rm_zeros
(
R
*
Rtrans
))));
dlog
<<
LINFO
<<
"corr_rot1_error: "
<<
corr_rot1_error
;
DLIB_TEST
(
std
::
abs
(
corr_rot1_error
)
<
1e-1
1
);
DLIB_TEST
(
std
::
abs
(
corr_rot1_error
)
<
1e-1
0
);
}
// Matching projection directions should be correlated with the amount of
// correlation indicated by the return value of cca().
...
...
@@ -255,7 +255,7 @@ namespace
// non-matching pairs of projections.
const
double
corr_rot1_error
=
max
(
abs
(
compute_correlations
(
rm_zeros
(
L
*
rotate
<
0
,
1
>
(
Ltrans
)),
rm_zeros
(
R
*
Rtrans
))));
dlog
<<
LINFO
<<
"corr_rot1_error: "
<<
corr_rot1_error
;
DLIB_TEST
(
std
::
abs
(
corr_rot1_error
)
<
1e-1
1
);
DLIB_TEST
(
std
::
abs
(
corr_rot1_error
)
<
1e-1
0
);
}
// Matching projection directions should be correlated with the amount of
// correlation indicated by the return value of cca().
...
...
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