Cubic B-Spline trajectory. More...
#include <roboptim/trajectory/cubic-b-spline.hh>
Public Member Functions | |
| CubicBSpline (interval_t timeRange, size_type dimension, const vector_t ¶meters, const std::string name="cubic B-Spline") throw () | |
| Instantiate a cubic B-Spline from its definition. | |
| CubicBSpline (const CubicBSpline &spline) throw () | |
| Copy constructor. | |
| virtual | ~CubicBSpline () throw () |
| virtual void | setParameters (const vector_t &) throw () |
| Modify spline parameters. | |
| virtual jacobian_t | variationConfigWrtParam (double t) const throw () |
| Get the variation of a configuration with respect to parameter vector. | |
| virtual jacobian_t | variationDerivWrtParam (double t, size_type order) const throw () |
| Get the variation of a derivative with respect to parameter vector. | |
| virtual value_type | singularPointAtRank (size_type rank) const |
| Get singular point at given rank. | |
| virtual vector_t | derivBeforeSingularPoint (size_type rank, size_type order) const |
| Get left limit value of derivative at given singular point. | |
| virtual vector_t | derivAfterSingularPoint (size_type rank, size_type order) const |
| Get right limit value of derivative at given singular point. | |
| virtual Trajectory < derivabilityOrder > * | resize (interval_t timeRange) const throw () |
| Clone and resize a trajectory. | |
| virtual std::ostream & | print (std::ostream &o) const throw () |
| Display the function on the specified output stream. | |
| jacobian_t | variationConfigWrtParam (StableTimePoint tp) const throw () |
| jacobian_t | variationDerivWrtParam (StableTimePoint tp, size_type order) const throw () |
Protected Member Functions | |
| void | impl_compute (result_t &, double) const throw () |
| void | impl_derivative (gradient_t &g, double x, size_type order) const throw () |
| void | impl_derivative (gradient_t &g, StableTimePoint, size_type order) const throw () |
| value_type | Dt () const |
| size_type | interval (value_type t) const |
| vector_t | basisFunctions (value_type t, size_type order) const |
Cubic B-Spline trajectory.
Implement a B-Spline as a trajectory as described below: given
of control points,
,
,
control points
in
, the cubic B-spline of control points
is defined over
by
are defined by:
| roboptim::CubicBSpline::CubicBSpline | ( | interval_t | timeRange, | |
| size_type | dimension, | |||
| const vector_t & | parameters, | |||
| const std::string | name = "cubic B-Spline" | |||
| ) | throw () |
Instantiate a cubic B-Spline from its definition.
| timeRange | spline time range: $ | |
| dimension | spline dimension: | |
| parameters | vector of parameters defining control points | |
| name | function title |
Number of control points is inferred from dimension of dimenion of parameter vector.
Referenced by resize().
| roboptim::CubicBSpline::CubicBSpline | ( | const CubicBSpline & | spline | ) | throw () |
Copy constructor.
| spline | spline that will be copied |
| roboptim::CubicBSpline::~CubicBSpline | ( | ) | throw () [virtual] |
| CubicBSpline::vector_t roboptim::CubicBSpline::basisFunctions | ( | value_type | t, | |
| size_type | order | |||
| ) | const [protected] |
References Dt(), interval(), and roboptim::Trajectory< 3 >::timeRange().
| CubicBSpline::vector_t roboptim::CubicBSpline::derivAfterSingularPoint | ( | size_type | rank, | |
| size_type | order | |||
| ) | const [virtual] |
Get right limit value of derivative at given singular point.
| rank | rank of the singular points. | |
| order | order of derivation. |
| derivative | Limit of the derivative at singular point for decreasing parameter values. |
Implements roboptim::Trajectory< 3 >.
References roboptim::Trajectory< 3 >::derivative(), and singularPointAtRank().
| CubicBSpline::vector_t roboptim::CubicBSpline::derivBeforeSingularPoint | ( | size_type | rank, | |
| size_type | order | |||
| ) | const [virtual] |
Get left limit value of derivative at given singular point.
| rank | rank of the singular points. | |
| order | order of derivation. |
Implements roboptim::Trajectory< 3 >.
References roboptim::Trajectory< 3 >::derivative(), and singularPointAtRank().
| CubicBSpline::value_type roboptim::CubicBSpline::Dt | ( | ) | const [protected] |
References roboptim::Trajectory< 3 >::length().
Referenced by basisFunctions(), and interval().
| void roboptim::CubicBSpline::impl_compute | ( | result_t & | derivative, | |
| double | t | |||
| ) | const throw () [protected] |
| void roboptim::CubicBSpline::impl_derivative | ( | gradient_t & | g, | |
| StableTimePoint | stp, | |||
| size_type | order | |||
| ) | const throw () [protected, virtual] |
Implements roboptim::Trajectory< 3 >.
| void roboptim::CubicBSpline::impl_derivative | ( | gradient_t & | g, | |
| double | x, | |||
| size_type | order | |||
| ) | const throw () [protected] |
| CubicBSpline::size_type roboptim::CubicBSpline::interval | ( | value_type | t | ) | const [protected] |
References Dt(), and roboptim::Trajectory< 3 >::timeRange().
Referenced by basisFunctions().
| std::ostream & roboptim::CubicBSpline::print | ( | std::ostream & | o | ) | const throw () [virtual] |
Display the function on the specified output stream.
| o | output stream used for display |
Reimplemented from roboptim::Trajectory< 3 >.
| virtual Trajectory<derivabilityOrder>* roboptim::CubicBSpline::resize | ( | interval_t | timeRange | ) | const throw () [inline, virtual] |
| void roboptim::CubicBSpline::setParameters | ( | const vector_t & | p | ) | throw () [virtual] |
Modify spline parameters.
Reimplemented from roboptim::Trajectory< 3 >.
Referenced by roboptim::SplineLength::impl_compute(), and roboptim::SplineLength::impl_gradient().
| CubicBSpline::value_type roboptim::CubicBSpline::singularPointAtRank | ( | size_type | rank | ) | const [virtual] |
Get singular point at given rank.
Implements roboptim::Trajectory< 3 >.
References roboptim::Trajectory< 3 >::length().
Referenced by derivAfterSingularPoint(), and derivBeforeSingularPoint().
| CubicBSpline::jacobian_t roboptim::CubicBSpline::variationConfigWrtParam | ( | StableTimePoint | tp | ) | const throw () [virtual] |
Implements roboptim::Trajectory< 3 >.
| CubicBSpline::jacobian_t roboptim::CubicBSpline::variationConfigWrtParam | ( | double | t | ) | const throw () [virtual] |
Get the variation of a configuration with respect to parameter vector.
| t | value in the definition interval. |
Implements roboptim::Trajectory< 3 >.
| CubicBSpline::jacobian_t roboptim::CubicBSpline::variationDerivWrtParam | ( | StableTimePoint | tp, | |
| size_type | order | |||
| ) | const throw () [virtual] |
Implements roboptim::Trajectory< 3 >.
| CubicBSpline::jacobian_t roboptim::CubicBSpline::variationDerivWrtParam | ( | double | t, | |
| size_type | order | |||
| ) | const throw () [virtual] |
Get the variation of a derivative with respect to parameter vector.
| t | value in the definition interval. | |
| order | order of the derivative. |
Implements roboptim::Trajectory< 3 >.