Loading...
Searching...
No Matches
ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate > Struct Template Referenceabstract

Represents a curve of dimension Dim. If value of parameter Safe is false, no verification is made on the evaluation of the curve. More...

#include <ndcurves/curve_abc.h>

Inheritance diagram for ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >:
Collaboration diagram for ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >:

Public Types

typedef Point point_t
 
typedef Point_derivate point_derivate_t
 
typedef Time time_t
 
typedef Numeric num_t
 
typedef curve_abc< Time, Numeric, Safe, point_t, point_derivate_tcurve_t
 
typedef curve_abc< Time, Numeric, Safe, point_derivate_tcurve_derivate_t
 
typedef std::shared_ptr< curve_tcurve_ptr_t
 

Public Member Functions

 curve_abc ()
 Constructor.
 
virtual ~curve_abc ()
 Destructor.
 
virtual point_t operator() (const time_t t) const =0
 Evaluation of the cubic spline at time t.
 
virtual curve_derivate_tcompute_derivate_ptr (const std::size_t order) const =0
 Compute the derived curve at order N.
 
virtual point_derivate_t derivate (const time_t t, const std::size_t order) const =0
 Evaluate the derivative of order N of curve at time t.
 
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.
 
virtual bool isApprox (const curve_t *other, const Numeric prec=Eigen::NumTraits< Numeric >::dummy_precision()) const =0
 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 std::size_t dim () const =0
 Get dimension of curve.
 
virtual time_t min () const =0
 Get the minimum time for which the curve is defined.
 
virtual time_t max () const =0
 Get the maximum time for which the curve is defined.
 
virtual std::size_t degree () const =0
 Get the degree of the curve.
 
std::pair< time_t, time_ttimeRange ()
 
template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 
- Public Member Functions inherited from ndcurves::serialization::Serializable
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.
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
struct ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >

Represents a curve of dimension Dim. If value of parameter Safe is false, no verification is made on the evaluation of the curve.

Member Typedef Documentation

◆ curve_derivate_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
typedef curve_abc<Time, Numeric, Safe, point_derivate_t> ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::curve_derivate_t

◆ curve_ptr_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
typedef std::shared_ptr<curve_t> ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::curve_ptr_t

◆ curve_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
typedef curve_abc<Time, Numeric, Safe, point_t, point_derivate_t> ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::curve_t

◆ num_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
typedef Numeric ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::num_t

◆ point_derivate_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
typedef Point_derivate ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::point_derivate_t

◆ point_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
typedef Point ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::point_t

◆ time_t

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
typedef Time ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::time_t

Constructor & Destructor Documentation

◆ curve_abc()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::curve_abc ( )
inline

Constructor.

◆ ~curve_abc()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
virtual ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::~curve_abc ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ compute_derivate_ptr()

◆ degree()

◆ derivate()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
virtual point_derivate_t ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::derivate ( const time_t  t,
const std::size_t  order 
) const
pure virtual

◆ dim()

◆ isApprox()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
virtual bool ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::isApprox ( const curve_t other,
const Numeric  prec = Eigen::NumTraits< Numeric >::dummy_precision() 
) const
pure virtual

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
otherthe other curve to check
precthe precision threshold, default Eigen::NumTraits<Numeric>::dummy_precision()
Returns
true if the two curves are approximately equal

Implemented in ndcurves::piecewise_curve< Time, Numeric, Safe, Point, Point_derivate, CurveType >, ndcurves::SE3Curve< Time, Numeric, Safe >, and ndcurves::SO3Linear< Time, Numeric, Safe >.

◆ isEquivalent()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
bool ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::isEquivalent ( const curve_t other,
const Numeric  prec = Eigen::NumTraits<Numeric>::dummy_precision(),
const size_t  order = 5 
) const
inline

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.

Parameters
otherthe other curve to check
orderthe order up to which the derivatives of the curves are checked for equality
precthe precision threshold, default Eigen::NumTraits<Numeric>::dummy_precision()
Returns
true if the two curves are approximately equal

◆ max()

◆ min()

◆ operator()()

◆ serialize()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
template<class Archive >
void ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::serialize ( Archive ar,
const unsigned int  version 
)
inline

◆ timeRange()

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
std::pair< time_t, time_t > ndcurves::curve_abc< Time, Numeric, Safe, Point, Point_derivate >::timeRange ( )
inline

Friends And Related Symbol Documentation

◆ boost::serialization::access

template<typename Time = double, typename Numeric = Time, bool Safe = false, typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point_derivate = Point>
friend class boost::serialization::access
friend

The documentation for this struct was generated from the following file: