|
| piecewise_curve () |
| Empty constructor. Add at least one curve to call other class functions.
|
|
| piecewise_curve (const curve_ptr_t &cf) |
| Constructor. Initialize a piecewise curve by giving the first curve.
|
|
| piecewise_curve (const t_curve_ptr_t &curves_list) |
|
| piecewise_curve (const piecewise_curve &other) |
|
virtual | ~piecewise_curve () |
|
virtual point_t | operator() (const Time t) const |
| Evaluation of the cubic spline at time t.
|
|
bool | isApprox (const piecewise_curve_t &other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const |
| isApprox check if other and *this are approximately equals. Only two curves of the same class can be approximately equals, for comparison between different type of curves see isEquivalent
|
|
virtual bool | isApprox (const base_curve_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const |
| isApprox check if other and *this are approximately equal given a precision threshold Only two curves of the same class can be approximately equal, for comparison between different type of curves see isEquivalent.
|
|
virtual bool | operator== (const piecewise_curve_t &other) const |
|
virtual bool | operator!= (const piecewise_curve_t &other) const |
|
virtual point_derivate_t | derivate (const Time t, const std::size_t order) const |
| Evaluate the derivative of order N of curve at time t.
|
|
piecewise_curve_derivate_t * | compute_derivate_ptr (const std::size_t order) const |
| compute_derivate return a piecewise_curve which is the derivative of this at given order
|
|
template<typename Curve > |
void | add_curve (const Curve &curve) |
|
void | add_curve_ptr (const curve_ptr_t &cf) |
| Add a new curve to piecewise curve, which should be defined in \([T_{min},T_{max}]\) where \(T_{min}\) is equal to \(T_{max}\) of the actual piecewise curve. The curve added should be of type Curve as defined in the template.
|
|
bool | is_continuous (const std::size_t order) |
| Check if the curve is continuous of order given.
|
|
std::size_t | num_curves () const |
| Get number of curves in piecewise curve.
|
|
curve_ptr_t | curve_at_time (const time_t t) const |
| Get curve corresponding to time t in piecewise curve. Example : A piecewise curve PC made of two curves : c1 for t in [0,1] and c2 for t in ]1,2]. PC.curve_at_time(0.5) will return c1.
|
|
curve_ptr_t | curve_at_index (const std::size_t idx) const |
| Get curve at specified index in piecewise curve.
|
|
template<typename Bezier > |
piecewise_curve_t | convert_piecewise_curve_to_bezier () |
| Convert all curves in piecewise curve into bezier curves.
|
|
template<typename Hermite > |
piecewise_curve_t | convert_piecewise_curve_to_cubic_hermite () |
| Convert all curves in piecewise curve into cubic hermite curves. Curves need to be of degree inferior or equal to three.
|
|
template<typename Polynomial > |
piecewise_curve_t | convert_piecewise_curve_to_polynomial () |
| Convert all curves in piecewise curve into polynomial curves.
|
|
virtual std::size_t | dim () const |
| Get dimension of curve.
|
|
virtual Time | min () const |
| Get the minimum time for which the curve is defined.
|
|
virtual Time | max () const |
| Get the maximum time for which the curve is defined.
|
|
virtual std::size_t | degree () const |
| Get the degree of the curve.
|
|
std::size_t | getNumberCurves () |
|
template<class Archive > |
void | serialize (Archive &ar, const unsigned int version) |
|
| curve_abc () |
| Constructor.
|
|
virtual | ~curve_abc () |
| Destructor.
|
|
bool | isEquivalent (const curve_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision(), const size_t order=5) const |
| isEquivalent check if other and *this are approximately equal by values, given a precision threshold. This test is done by discretizing both curves and evaluating them and their derivatives.
|
|
std::pair< time_t, time_t > | timeRange () |
|
template<class Archive > |
void | serialize (Archive &ar, const unsigned int version) |
|
template<class Derived > |
void | loadFromText (const std::string &filename) |
| Loads a Derived object from a text file.
|
|
template<class Derived > |
void | saveAsText (const std::string &filename) const |
| Saved a Derived object as a text file.
|
|
template<class Derived > |
void | loadFromXML (const std::string &filename, const std::string &tag_name) |
| Loads a Derived object from an XML file.
|
|
template<class Derived > |
void | saveAsXML (const std::string &filename, const std::string &tag_name) const |
| Saved a Derived object as an XML file.
|
|
template<class Derived > |
void | loadFromBinary (const std::string &filename) |
| Loads a Derived object from an binary file.
|
|
template<class Derived > |
void | saveAsBinary (const std::string &filename) const |
| Saved a Derived object as an binary file.
|
|
|
template<typename Polynomial > |
static piecewise_curve_t | convert_discrete_points_to_polynomial (t_point_t points, t_time_t time_points) |
| Convert discrete points into piecewise polynomial curve with C0 continuity.
|
|
template<typename Polynomial > |
static piecewise_curve_t | convert_discrete_points_to_polynomial (t_point_t points, t_point_derivate_t points_derivative, t_time_t time_points) |
| Convert discrete points into piecewise polynomial curve with C1 continuity.
|
|
template<typename Polynomial > |
static piecewise_curve_t | convert_discrete_points_to_polynomial (t_point_t points, t_point_derivate_t points_derivative, t_point_derivate_t points_second_derivative, t_time_t time_points) |
| Convert discrete points into piecewise polynomial curve with C2 continuity.
|
|
template<typename Polynomial > |
static piecewise_curve_t | load_piecewise_from_text_file (const std::string &filename, const time_t dt, const size_t dim) |
| load_piecewise_from_text_file build a piecewise polynomial from a list of discrete points read from a file. The file should contains one points per line, optionally with it's derivative and second derivatives. Each lines should then contains dim, 2*dim or 3*dim values
|
|
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
virtual bool ndcurves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >::isApprox |
( |
const base_curve_t * |
other, |
|
|
const Numeric |
prec = Eigen::NumTraits< Numeric >::dummy_precision() |
|
) |
| const |
|
inlinevirtual |
isApprox check if other and *this are approximately equal given a precision threshold Only two curves of the same class can be approximately equal, for comparison between different type of curves see isEquivalent.
- Parameters
-
other | the other curve to check |
prec | the precision threshold, default Eigen::NumTraits<Numeric>::dummy_precision() |
- Returns
- true if the two curves are approximately equal
Implements ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >.
template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point, typename CurveType = curve_abc<Time, Numeric, Safe, Point, Point_derivate>>
isApprox check if other and *this are approximately equals. Only two curves of the same class can be approximately equals, for comparison between different type of curves see isEquivalent
- Parameters
-
other | the other curve to check |
prec | the precision threshold, default Eigen::NumTraits<Numeric>::dummy_precision() |
- Returns
- true is the two curves are approximately equals