Commit ed8fa3cc authored by JasonChmn's avatar JasonChmn Committed by Pierre Fernbach
Browse files

[curve_abc] Remove Dim from template

parent 7e77e0da
...@@ -30,7 +30,7 @@ namespace curves ...@@ -30,7 +30,7 @@ namespace curves
/// ///
template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
, typename Point= Eigen::Matrix<Numeric, Eigen::Dynamic, 1> > , typename Point= Eigen::Matrix<Numeric, Eigen::Dynamic, 1> >
struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point> struct bezier_curve : public curve_abc<Time, Numeric, Safe, Point>
{ {
typedef Point point_t; typedef Point point_t;
typedef Time time_t; typedef Time time_t;
......
...@@ -32,7 +32,7 @@ template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool S ...@@ -32,7 +32,7 @@ template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool S
, typename Point= Eigen::Matrix<Numeric, Eigen::Dynamic, 1> , typename Point= Eigen::Matrix<Numeric, Eigen::Dynamic, 1>
, typename Tangent= Eigen::Matrix<Numeric, Eigen::Dynamic, 1> , typename Tangent= Eigen::Matrix<Numeric, Eigen::Dynamic, 1>
> >
struct cubic_hermite_spline : public curve_abc<Time, Numeric, Dim, Safe, Point> struct cubic_hermite_spline : public curve_abc<Time, Numeric, Safe, Point>
{ {
typedef std::pair<Point, Tangent> pair_point_tangent_t; typedef std::pair<Point, Tangent> pair_point_tangent_t;
typedef std::vector< pair_point_tangent_t ,Eigen::aligned_allocator<Point> > t_pair_point_tangent_t; typedef std::vector< pair_point_tangent_t ,Eigen::aligned_allocator<Point> > t_pair_point_tangent_t;
......
...@@ -21,7 +21,7 @@ namespace curves ...@@ -21,7 +21,7 @@ namespace curves
/// \struct curve_abc. /// \struct curve_abc.
/// \brief Represents a curve of dimension Dim. /// \brief Represents a curve of dimension Dim.
/// If value of parameter Safe is false, no verification is made on the evaluation of the curve. /// If value of parameter Safe is false, no verification is made on the evaluation of the curve.
template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false template<typename Time= double, typename Numeric=Time, bool Safe=false
, typename Point= Eigen::Matrix<Numeric, Eigen::Dynamic, 1> > , typename Point= Eigen::Matrix<Numeric, Eigen::Dynamic, 1> >
struct curve_abc : std::unary_function<Time, Point> struct curve_abc : std::unary_function<Time, Point>
{ {
......
...@@ -39,7 +39,7 @@ namespace curves ...@@ -39,7 +39,7 @@ namespace curves
template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false
, typename Point= Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point =std::vector<Point,Eigen::aligned_allocator<Point> > , typename Point= Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point =std::vector<Point,Eigen::aligned_allocator<Point> >
, typename SplineBase=polynomial<Time, Numeric, Dim, Safe, Point, T_Point> > , typename SplineBase=polynomial<Time, Numeric, Dim, Safe, Point, T_Point> >
struct exact_cubic : public curve_abc<Time, Numeric, Dim, Safe, Point> struct exact_cubic : public curve_abc<Time, Numeric, Safe, Point>
{ {
typedef Point point_t; typedef Point point_t;
typedef T_Point t_point_t; typedef T_Point t_point_t;
...@@ -51,7 +51,7 @@ struct exact_cubic : public curve_abc<Time, Numeric, Dim, Safe, Point> ...@@ -51,7 +51,7 @@ struct exact_cubic : public curve_abc<Time, Numeric, Dim, Safe, Point>
typedef typename std::vector<spline_t> t_spline_t; typedef typename std::vector<spline_t> t_spline_t;
typedef typename t_spline_t::iterator it_spline_t; typedef typename t_spline_t::iterator it_spline_t;
typedef typename t_spline_t::const_iterator cit_spline_t; typedef typename t_spline_t::const_iterator cit_spline_t;
typedef curve_abc<Time, Numeric, Dim, Safe, Point> curve_abc_t; typedef curve_abc<Time, Numeric, Safe, Point> curve_abc_t;
typedef curve_constraints<point_t> spline_constraints; typedef curve_constraints<point_t> spline_constraints;
/* Constructors - destructors */ /* Constructors - destructors */
......
...@@ -33,7 +33,7 @@ typedef Eigen::Matrix<Numeric, 4, 1> quat_t; ...@@ -33,7 +33,7 @@ typedef Eigen::Matrix<Numeric, 4, 1> quat_t;
typedef Eigen::Ref<quat_t> quat_ref_t; typedef Eigen::Ref<quat_t> quat_ref_t;
typedef const Eigen::Ref<const quat_t> quat_ref_const_t; typedef const Eigen::Ref<const quat_t> quat_ref_const_t;
typedef Eigen::Matrix<Numeric, 7, 1> config_t; typedef Eigen::Matrix<Numeric, 7, 1> config_t;
typedef curve_abc<Time, Numeric, 4, false, quat_t> curve_abc_quat_t; typedef curve_abc<Time, Numeric, false, quat_t> curve_abc_quat_t;
typedef std::pair<Numeric, quat_t > waypoint_quat_t; typedef std::pair<Numeric, quat_t > waypoint_quat_t;
typedef std::vector<waypoint_quat_t> t_waypoint_quat_t; typedef std::vector<waypoint_quat_t> t_waypoint_quat_t;
typedef Eigen::Matrix<Numeric, 1, 1> point_one_dim_t; typedef Eigen::Matrix<Numeric, 1, 1> point_one_dim_t;
......
...@@ -27,9 +27,9 @@ namespace curves ...@@ -27,9 +27,9 @@ namespace curves
template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false, template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false,
typename Point= Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename Point= Eigen::Matrix<Numeric, Eigen::Dynamic, 1>,
typename T_Point= std::vector<Point,Eigen::aligned_allocator<Point> >, typename T_Point= std::vector<Point,Eigen::aligned_allocator<Point> >,
typename Curve= curve_abc<Time, Numeric, Dim, Safe, Point> typename Curve= curve_abc<Time, Numeric, Safe, Point>
> >
struct piecewise_curve : public curve_abc<Time, Numeric, Dim, Safe, Point> struct piecewise_curve : public curve_abc<Time, Numeric, Safe, Point>
{ {
typedef Point point_t; typedef Point point_t;
typedef T_Point t_point_t; typedef T_Point t_point_t;
......
...@@ -33,13 +33,13 @@ namespace curves ...@@ -33,13 +33,13 @@ namespace curves
/// ///
template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false, template<typename Time= double, typename Numeric=Time, std::size_t Dim=3, bool Safe=false,
typename Point= Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point =std::vector<Point,Eigen::aligned_allocator<Point> > > typename Point= Eigen::Matrix<Numeric, Eigen::Dynamic, 1>, typename T_Point =std::vector<Point,Eigen::aligned_allocator<Point> > >
struct polynomial : public curve_abc<Time, Numeric, Dim, Safe, Point> struct polynomial : public curve_abc<Time, Numeric, Safe, Point>
{ {
typedef Point point_t; typedef Point point_t;
typedef T_Point t_point_t; typedef T_Point t_point_t;
typedef Time time_t; typedef Time time_t;
typedef Numeric num_t; typedef Numeric num_t;
typedef curve_abc<Time, Numeric, Dim, Safe, Point> curve_abc_t; typedef curve_abc<Time, Numeric, Safe, Point> curve_abc_t;
typedef Eigen::Matrix<double, Dim, Eigen::Dynamic> coeff_t; typedef Eigen::Matrix<double, Dim, Eigen::Dynamic> coeff_t;
typedef Eigen::Ref<coeff_t> coeff_t_ref; typedef Eigen::Ref<coeff_t> coeff_t_ref;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment