11#ifndef _STRUCT_CURVE_ABC
12#define _STRUCT_CURVE_ABC
33template <
typename Time =
double,
typename Numeric = Time,
bool Safe =
false,
34 typename Point = Eigen::Matrix<Numeric, Eigen::Dynamic, 1>,
67 const std::size_t
order)
const = 0;
75 const std::size_t
order)
const = 0;
90 const Numeric
prec = Eigen::NumTraits<Numeric>::dummy_precision(),
91 const size_t order = 5)
const {
109 for (
size_t n = 1;
n <=
order; ++
n) {
133 Eigen::NumTraits<Numeric>::dummy_precision())
const = 0;
140 virtual std::size_t
dim()
const = 0;
156 template <
class Archive>
158 serialization::register_types<Archive>(
ar,
version);
168 SINGLE_ARG(
typename Time,
typename Numeric,
bool Safe,
typename Point,
169 typename Point_derivate),
#define DEFINE_CLASS_TEMPLATE_VERSION(Template, Type)
Definition archive.hpp:27
#define SINGLE_ARG(...)
Definition archive.hpp:23
Definition bernstein.h:20
bool isApprox(const T a, const T b, const T eps=1e-6)
Definition curve_abc.h:25
Represents a curve of dimension Dim. If value of parameter Safe is false, no verification is made on ...
Definition curve_abc.h:36
std::shared_ptr< curve_t > curve_ptr_t
Definition curve_abc.h:45
Numeric num_t
Definition curve_abc.h:40
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...
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....
Definition curve_abc.h:88
virtual std::size_t dim() const =0
Get dimension of curve.
Time time_t
Definition curve_abc.h:39
curve_abc< Time, Numeric, Safe, point_t, point_derivate_t > curve_t
Definition curve_abc.h:42
virtual ~curve_abc()
Destructor.
Definition curve_abc.h:53
virtual point_t operator()(const time_t t) const =0
Evaluation of the cubic spline at time t.
curve_abc()
Constructor.
Definition curve_abc.h:50
Point_derivate point_derivate_t
Definition curve_abc.h:38
virtual time_t min() const =0
Get the minimum time for which the curve is defined.
std::pair< time_t, time_t > timeRange()
Definition curve_abc.h:151
curve_abc< Time, Numeric, Safe, point_derivate_t > curve_derivate_t
Definition curve_abc.h:44
friend class boost::serialization::access
Definition curve_abc.h:155
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.
virtual time_t max() const =0
Get the maximum time for which the curve is defined.
void serialize(Archive &ar, const unsigned int version)
Definition curve_abc.h:157
virtual curve_derivate_t * compute_derivate_ptr(const std::size_t order) const =0
Compute the derived curve at order N.
Point point_t
Definition curve_abc.h:37
virtual std::size_t degree() const =0
Get the degree of the curve.
Definition archive.hpp:41