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
Pierre Fernbach
curves
Commits
983d2a26
Commit
983d2a26
authored
Aug 30, 2019
by
Pierre Fernbach
Browse files
[python] refactor wrapSplineConstructor -> wrapPolynomialConstructor
parent
379224b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/curves_python.cpp
View file @
983d2a26
...
...
@@ -136,15 +136,15 @@ namespace curves
{
return
new
polynomial_t
(
array
,
0.
,
1.
);
}
polynomial_t
*
wrap
Spline
ConstructorFromBoundaryConditionsDegree1
(
const
point_t
&
init
,
const
point_t
&
end
,
const
real
min
,
const
real
max
)
polynomial_t
*
wrap
Polynomial
ConstructorFromBoundaryConditionsDegree1
(
const
point
X
_t
&
init
,
const
point
X
_t
&
end
,
const
real
min
,
const
real
max
)
{
return
new
polynomial_t
(
init
,
end
,
min
,
max
);
}
polynomial_t
*
wrap
Spline
ConstructorFromBoundaryConditionsDegree3
(
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
*
wrap
Polynomial
ConstructorFromBoundaryConditionsDegree3
(
const
point
X
_t
&
init
,
const
point
X
_t
&
d_init
,
const
point
X
_t
&
end
,
const
point
X
_t
&
d_end
,
const
real
min
,
const
real
max
)
{
return
new
polynomial_t
(
init
,
d_init
,
end
,
d_end
,
min
,
max
);
}
polynomial_t
*
wrap
Spline
ConstructorFromBoundaryConditionsDegree5
(
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
*
wrap
Polynomial
ConstructorFromBoundaryConditionsDegree5
(
const
point
X
_t
&
init
,
const
point
X
_t
&
d_init
,
const
point
X
_t
&
dd_init
,
const
point
X
_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
(
&
wrap
Spline
Constructor1
,
default_call_policies
(),
args
(
"coeffs"
,
"min"
,
"max"
)),
.
def
(
"__init__"
,
make_constructor
(
&
wrap
Polynomial
Constructor1
,
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
(
&
wrap
Spline
Constructor2
,
default_call_policies
(),
arg
(
"coeffs"
)),
.
def
(
"__init__"
,
make_constructor
(
&
wrap
Polynomial
Constructor2
,
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
(
&
wrap
Spline
ConstructorFromBoundaryConditionsDegree1
,
.
def
(
"__init__"
,
make_constructor
(
&
wrap
Polynomial
ConstructorFromBoundaryConditionsDegree1
,
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
(
&
wrap
Spline
ConstructorFromBoundaryConditionsDegree3
,
.
def
(
"__init__"
,
make_constructor
(
&
wrap
Polynomial
ConstructorFromBoundaryConditionsDegree3
,
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
(
&
wrap
Spline
ConstructorFromBoundaryConditionsDegree5
,
.
def
(
"__init__"
,
make_constructor
(
&
wrap
Polynomial
ConstructorFromBoundaryConditionsDegree5
,
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], "
...
...
Write
Preview
Markdown
is supported
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