Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Youssefi
otb
Commits
3b9dfbe0
Commit
3b9dfbe0
authored
14 years ago
by
Julien Malik
Browse files
Options
Downloads
Patches
Plain Diff
COMP: fix windows compilation
parent
ddf5cb10
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Testing/Utilities/ossimpluginsHermiteInterpolation.cxx
+12
-11
12 additions, 11 deletions
Testing/Utilities/ossimpluginsHermiteInterpolation.cxx
with
12 additions
and
11 deletions
Testing/Utilities/ossimpluginsHermiteInterpolation.cxx
+
12
−
11
View file @
3b9dfbe0
...
@@ -27,7 +27,6 @@
...
@@ -27,7 +27,6 @@
int
ossimpluginsHermiteInterpolationTest
(
int
argc
,
char
*
argv
[])
int
ossimpluginsHermiteInterpolationTest
(
int
argc
,
char
*
argv
[])
{
{
itk
::
TimeProbe
chrono
;
double
epsilon
=
0.0000001
;
double
epsilon
=
0.0000001
;
double
xref
[
11
];
double
xref
[
11
];
...
@@ -87,8 +86,8 @@ int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
...
@@ -87,8 +86,8 @@ int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
std
::
cout
<<
std
::
setprecision
(
15
)
<<
"Value at "
<<
x
<<
" : "
<<
y
<<
" (derivative "
<<
dy
<<
")
\n
"
;
std
::
cout
<<
std
::
setprecision
(
15
)
<<
"Value at "
<<
x
<<
" : "
<<
y
<<
" (derivative "
<<
dy
<<
")
\n
"
;
std
::
cout
<<
"- Should be : "
<<
yExpected
<<
" (derivative "
<<
dyExpected
<<
")"
<<
std
::
endl
;
std
::
cout
<<
"- Should be : "
<<
yExpected
<<
" (derivative "
<<
dyExpected
<<
")"
<<
std
::
endl
;
if
(
std
::
isnan
(
y
)
||
(
(
y
-
yExpected
)
/
yExpected
>
epsilon
))
return
EXIT_FAILURE
;
if
(
ossim
::
isnan
(
y
)
||
(
(
y
-
yExpected
)
/
yExpected
>
epsilon
))
return
EXIT_FAILURE
;
if
(
std
::
isnan
(
dy
)
||
(
(
dy
-
dyExpected
)
/
dyExpected
>
epsilon
))
return
EXIT_FAILURE
;
if
(
ossim
::
isnan
(
dy
)
||
(
(
dy
-
dyExpected
)
/
dyExpected
>
epsilon
))
return
EXIT_FAILURE
;
//Test limit situation
//Test limit situation
x
=
56640.0
;
x
=
56640.0
;
...
@@ -98,8 +97,8 @@ int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
...
@@ -98,8 +97,8 @@ int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
std
::
cout
<<
std
::
setprecision
(
15
)
<<
"Value at "
<<
x
<<
" : "
<<
y
<<
" (derivative "
<<
dy
<<
")
\n
"
;
std
::
cout
<<
std
::
setprecision
(
15
)
<<
"Value at "
<<
x
<<
" : "
<<
y
<<
" (derivative "
<<
dy
<<
")
\n
"
;
std
::
cout
<<
"- Should be : "
<<
yExpected
<<
" (derivative "
<<
dyExpected
<<
")"
<<
std
::
endl
;
std
::
cout
<<
"- Should be : "
<<
yExpected
<<
" (derivative "
<<
dyExpected
<<
")"
<<
std
::
endl
;
if
(
std
::
isnan
(
y
)
||
(
(
y
-
yExpected
)
/
yExpected
>
epsilon
))
return
EXIT_FAILURE
;
if
(
ossim
::
isnan
(
y
)
||
(
(
y
-
yExpected
)
/
yExpected
>
epsilon
))
return
EXIT_FAILURE
;
if
(
std
::
isnan
(
dy
)
||
(
(
dy
-
dyExpected
)
/
dyExpected
>
epsilon
))
return
EXIT_FAILURE
;
if
(
ossim
::
isnan
(
dy
)
||
(
(
dy
-
dyExpected
)
/
dyExpected
>
epsilon
))
return
EXIT_FAILURE
;
x
=
56700.0
;
x
=
56700.0
;
yExpected
=
-
1489827.1436
;
yExpected
=
-
1489827.1436
;
...
@@ -108,13 +107,14 @@ int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
...
@@ -108,13 +107,14 @@ int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
std
::
cout
<<
std
::
setprecision
(
15
)
<<
"Value at "
<<
x
<<
" : "
<<
y
<<
" (derivative "
<<
dy
<<
")
\n
"
;
std
::
cout
<<
std
::
setprecision
(
15
)
<<
"Value at "
<<
x
<<
" : "
<<
y
<<
" (derivative "
<<
dy
<<
")
\n
"
;
std
::
cout
<<
"- Should be : "
<<
yExpected
<<
" (derivative "
<<
dyExpected
<<
")"
<<
std
::
endl
;
std
::
cout
<<
"- Should be : "
<<
yExpected
<<
" (derivative "
<<
dyExpected
<<
")"
<<
std
::
endl
;
if
(
std
::
isnan
(
y
)
||
(
(
y
-
yExpected
)
/
yExpected
>
epsilon
))
return
EXIT_FAILURE
;
if
(
ossim
::
isnan
(
y
)
||
(
(
y
-
yExpected
)
/
yExpected
>
epsilon
))
return
EXIT_FAILURE
;
if
(
std
::
isnan
(
dy
)
||
(
(
dy
-
dyExpected
)
/
dyExpected
>
epsilon
))
return
EXIT_FAILURE
;
if
(
ossim
::
isnan
(
dy
)
||
(
(
dy
-
dyExpected
)
/
dyExpected
>
epsilon
))
return
EXIT_FAILURE
;
x
=
56942.862208
;
x
=
56942.862208
;
//Performance test
//Performance test
int
nTest
=
1000000
;
int
nTest
=
1000000
;
itk
::
TimeProbe
chrono
;
chrono
.
Start
();
chrono
.
Start
();
for
(
int
i
=
0
;
i
<
nTest
;
++
i
)
for
(
int
i
=
0
;
i
<
nTest
;
++
i
)
{
{
...
@@ -123,7 +123,7 @@ int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
...
@@ -123,7 +123,7 @@ int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
}
}
chrono
.
Stop
();
chrono
.
Stop
();
std
::
cout
<<
"Computation time: "
<<
chrono
.
GetMean
Time
()
<<
" s"
<<
std
::
endl
;
std
::
cout
<<
"Computation time: "
<<
chrono
.
GetMean
()
<<
" s"
<<
std
::
endl
;
std
::
cout
<<
" *** Test y only ***"
<<
std
::
endl
;
std
::
cout
<<
" *** Test y only ***"
<<
std
::
endl
;
...
@@ -136,7 +136,8 @@ int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
...
@@ -136,7 +136,8 @@ int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
std
::
cout
<<
"- Should be : -1154600.87561283"
<<
std
::
endl
;
std
::
cout
<<
"- Should be : -1154600.87561283"
<<
std
::
endl
;
//Performance test
//Performance test
chrono
.
Start
();
itk
::
TimeProbe
chrono2
;
chrono2
.
Start
();
for
(
int
i
=
0
;
i
<
nTest
;
++
i
)
for
(
int
i
=
0
;
i
<
nTest
;
++
i
)
{
{
...
@@ -144,8 +145,8 @@ int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
...
@@ -144,8 +145,8 @@ int ossimpluginsHermiteInterpolationTest(int argc, char * argv[])
interp2
->
Interpolate
(
x2
,
y2
);
interp2
->
Interpolate
(
x2
,
y2
);
}
}
chrono
.
Stop
();
chrono
2
.
Stop
();
std
::
cout
<<
chrono
.
GetMean
Time
()
<<
" s"
<<
std
::
endl
;
std
::
cout
<<
"Computation time: "
<<
chrono
2
.
GetMean
()
<<
" s"
<<
std
::
endl
;
return
EXIT_SUCCESS
;
return
EXIT_SUCCESS
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment