Commit 983d2a26 authored by Pierre Fernbach's avatar Pierre Fernbach
Browse files

[python] refactor wrapSplineConstructor -> wrapPolynomialConstructor

parent 379224b2
......@@ -136,15 +136,15 @@ namespace curves
{
return new polynomial_t(array, 0., 1.);
}
polynomial_t* wrapSplineConstructorFromBoundaryConditionsDegree1(const point_t& init,const point_t& end,const real min, const real max)
polynomial_t* wrapPolynomialConstructorFromBoundaryConditionsDegree1(const pointX_t& init,const pointX_t& end,const real min, const real max)
{
return new polynomial_t(init,end,min,max);
}
polynomial_t* wrapSplineConstructorFromBoundaryConditionsDegree3(const point_t& init,const point_t& d_init,const point_t& end,const point_t& d_end,const real min, const real max)
polynomial_t* wrapPolynomialConstructorFromBoundaryConditionsDegree3(const pointX_t& init,const pointX_t& d_init,const pointX_t& end,const pointX_t& d_end,const real min, const real max)
{
return new polynomial_t(init,d_init,end,d_end,min,max);
}
polynomial_t* wrapSplineConstructorFromBoundaryConditionsDegree5(const point_t& init,const point_t& d_init,const point_t& dd_init,const point_t& end,const point_t& d_end,const point_t& dd_end,const real min, const real max)
polynomial_t* wrapPolynomialConstructorFromBoundaryConditionsDegree5(const pointX_t& init,const pointX_t& d_init,const pointX_t& dd_init,const pointX_t& end,const point_t& d_end,const point_t& dd_end,const real min, const real max)
{
return new polynomial_t(init,d_init,dd_init,end,d_end,dd_end,min,max);
}
......@@ -352,24 +352,24 @@ namespace curves
/** END variable points bezier curve**/
/** BEGIN polynomial curve function**/
class_<polynomial_t>("polynomial", init<>())
.def("__init__", make_constructor(&wrapSplineConstructor1,default_call_policies(),args("coeffs","min","max")),
.def("__init__", make_constructor(&wrapPolynomialConstructor1,default_call_policies(),args("coeffs","min","max")),
"Create polynomial spline from an Eigen matrix of coefficient defined for t \in [min,max]."
" The matrix should contain one coefficient per column, from the zero order coefficient,up to the highest order."
" Spline order is given by the number of the columns -1.")
.def("__init__", make_constructor(&wrapSplineConstructor2,default_call_policies(),arg("coeffs")),
.def("__init__", make_constructor(&wrapPolynomialConstructor2,default_call_policies(),arg("coeffs")),
"Create polynomial spline from an Eigen matrix of coefficient defined for t \in [0,1]."
" The matrix should contain one coefficient per column, from the zero order coefficient,up to the highest order."
" Spline order is given by the number of the columns -1.")
.def("__init__", make_constructor(&wrapSplineConstructorFromBoundaryConditionsDegree1,
.def("__init__", make_constructor(&wrapPolynomialConstructorFromBoundaryConditionsDegree1,
default_call_policies(),args("init","end","min","max")),
"Create a polynomial of degree 1 defined for t \in [min,max], "
"such that c(min) == init and c(max) == end.")
.def("__init__", make_constructor(&wrapSplineConstructorFromBoundaryConditionsDegree3,
.def("__init__", make_constructor(&wrapPolynomialConstructorFromBoundaryConditionsDegree3,
default_call_policies(),args("init","d_init","end","d_end","min","max")),
"Create a polynomial of degree 3 defined for t \in [min,max], "
"such that c(min) == init and c(max) == end"
" dc(min) == d_init and dc(max) == d_end")
.def("__init__", make_constructor(&wrapSplineConstructorFromBoundaryConditionsDegree5,
.def("__init__", make_constructor(&wrapPolynomialConstructorFromBoundaryConditionsDegree5,
default_call_policies(),
args("init","d_init","dd_init","end","d_end","dd_end","min","max")),
"Create a polynomial of degree 5 defined for t \in [min,max], "
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment