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
Guilhem Saurel
ndcurves
Commits
a1d9c6f5
Commit
a1d9c6f5
authored
Mar 14, 2017
by
Steve Tonneau
Browse files
added python bindings for derivative
parent
3005c737
Changes
2
Hide whitespace changes
Inline
Side-by-side
python/spline_python.cpp
View file @
a1d9c6f5
...
...
@@ -159,6 +159,8 @@ BOOST_PYTHON_MODULE(spline)
.
def
(
"min"
,
&
bezier_t
::
min
)
.
def
(
"max"
,
&
bezier_t
::
max
)
.
def
(
"__call__"
,
&
bezier_t
::
operator
())
.
def
(
"derivate"
,
&
bezier_t
::
derivate
)
.
def
(
"compute_derivate"
,
&
bezier_t
::
compute_derivate
)
;
/** END bezier curve**/
...
...
python/test/test.py
View file @
a1d9c6f5
...
...
@@ -11,6 +11,10 @@ a = bezier(waypoints, -1., 3.)
a
.
min
()
a
.
max
()
a
(
0.4
)
assert
((
a
.
derivate
(
0.4
,
0
)
==
a
(
0.4
)).
all
())
a
.
derivate
(
0.4
,
2
)
a
=
a
.
compute_derivate
(
100
)
#testing spline function
...
...
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