Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Pierre Fernbach
curves
Commits
b33b907d
Commit
b33b907d
authored
May 05, 2020
by
Pierre Fernbach
Browse files
[Test] add test-case for cubic-hermite compute_derivate
parent
129b0aa2
Pipeline
#9458
failed with stage
in 4 minutes and 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
tests/Main.cpp
View file @
b33b907d
...
...
@@ -1071,6 +1071,22 @@ void CubicHermitePairsPositionDerivativeTest(bool& error) {
ComparePoints
(
t1
,
res1
,
errmsg3
,
error
);
res1
=
cubic_hermite_spline_2Pairs
.
derivate
(
1.
,
1
);
ComparePoints
(
t2
,
res1
,
errmsg3
,
error
);
pointX_t
p_derivate
,
p_compute_derivate
;
for
(
size_t
order
=
1
;
order
<
5
;
++
order
){
std
::
stringstream
ss
;
ss
<<
"in Cubic Hermite 2 points, "
"compute_derivate do not lead to the same results as derivate for order = "
;
ss
<<
order
<<
std
::
endl
;
curve_ptr_t
derivate_ptr
(
cubic_hermite_spline_2Pairs
.
compute_derivate_ptr
(
order
));
double
t
=
0.
;
while
(
t
<=
1.
){
p_derivate
=
cubic_hermite_spline_2Pairs
.
derivate
(
t
,
order
);
p_compute_derivate
=
derivate_ptr
->
operator
()(
t
);
ComparePoints
(
p_derivate
,
p_compute_derivate
,
ss
.
str
(),
error
);
t
+=
0.1
;
}
}
}
catch
(...)
{
error
=
true
;
std
::
cout
<<
"Error in CubicHermitePairsPositionDerivativeTest"
<<
std
::
endl
;
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment