Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jason Chemin
curves
Commits
172bceb4
Commit
172bceb4
authored
Aug 02, 2019
by
JasonChmn
Committed by
Pierre Fernbach
Sep 03, 2019
Browse files
[Rebase problem] Fix problems
parent
68e68954
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/curves/polynomial.h
View file @
172bceb4
...
...
@@ -110,7 +110,7 @@ struct polynomial : public curve_abc<Time, Numeric, Safe, Point>
{
std
::
invalid_argument
(
"Tmin should be inferior to Tmax"
);
}
if
(
coefficients_
.
size
()
!=
int
(
order
_
+
1
))
if
(
coefficients_
.
size
()
!=
int
(
degree
_
+
1
))
{
std
::
runtime_error
(
"Spline order and coefficients do not match"
);
}
...
...
@@ -167,7 +167,7 @@ struct polynomial : public curve_abc<Time, Numeric, Safe, Point>
}
time_t
const
dt
(
t
-
t_min_
);
time_t
cdt
(
1
);
point_t
currentPoint_
=
point_t
::
Zero
();
point_t
currentPoint_
=
point_t
::
Zero
(
dim_
);
for
(
int
i
=
(
int
)(
order
);
i
<
(
int
)(
degree_
+
1
);
++
i
,
cdt
*=
dt
)
{
currentPoint_
+=
cdt
*
coefficients_
.
col
(
i
)
*
fact
(
i
,
order
);
...
...
tests/Main.cpp
View file @
172bceb4
...
...
@@ -1420,6 +1420,7 @@ void piecewiseCurveConversionFromDiscretePointsTest(bool& error)
ComparePoints
(
p1
,
ppc
(
T_min
+
timestep
),
errMsg
,
error
);
ComparePoints
(
p2
,
ppc
(
T_min
+
2
*
timestep
),
errMsg
,
error
);
ComparePoints
(
p3
,
ppc
(
T_max
),
errMsg
,
error
);
}
int
main
(
int
/*argc*/
,
char
**
/*argv[]*/
)
{
...
...
Write
Preview
Supports
Markdown
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