Commit a434b747 authored by JasonChmn's avatar JasonChmn
Browse files

Edit namespace, folder, file names from curve to curves

parent 5d290de4
Pipeline #4155 passed with stage
in 2 minutes and 2 seconds
......@@ -37,7 +37,7 @@ ENDIF(BUILD_PYTHON_INTERFACE)
SEARCH_FOR_BOOST()
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})
ADD_SUBDIRECTORY(include/curve)
ADD_SUBDIRECTORY(include/curves)
ADD_SUBDIRECTORY(tests)
SETUP_HPP_PROJECT_FINALIZE()
Subproject commit 61e5574a0615706aab06986f6aecf665ddc31141
Subproject commit cea261e3da7d383844530070356bca76d20197a8
......@@ -15,7 +15,7 @@ SET(${PROJECT_NAME}_HEADERS
INSTALL(FILES
${${PROJECT_NAME}_HEADERS}
DESTINATION include/curve
DESTINATION include/curves
)
ADD_SUBDIRECTORY(helpers)
......@@ -20,7 +20,7 @@
#include <vector>
#include <utility>
namespace curve{
namespace curves{
//REF: boulic et al An inverse kinematics architecture enforcing an arbitrary number of strict priority levels
template<typename _Matrix_Type_>
......@@ -40,5 +40,5 @@ void PseudoInverse(_Matrix_Type_& pinvmat)
pinvmat = (svd.matrixV()*m_sigma_inv*svd.matrixU().transpose());
}
} // namespace curve
} // namespace curves
#endif //_SPLINEMATH
......@@ -18,7 +18,7 @@
#include <vector>
#include <stdexcept>
namespace curve
namespace curves
{
///
/// \brief Computes factorial of a number.
......@@ -74,6 +74,6 @@ std::vector<Bern<Numeric> > makeBernstein(const unsigned int n)
res.push_back(Bern<Numeric>(n, i));
return res;
}
} // namespace curve
} // namespace curves
#endif //_CLASS_BERNSTEIN
......@@ -21,7 +21,7 @@
#include <iostream>
namespace curve
namespace curves
{
/// \class BezierCurve.
/// \brief Represents a Bezier curve of arbitrary dimension and order.
......@@ -54,7 +54,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
, mult_T_(1.)
, size_(std::distance(PointsBegin, PointsEnd))
, degree_(size_-1)
, bernstein_(curve::makeBernstein<num_t>((unsigned int)degree_))
, bernstein_(curves::makeBernstein<num_t>((unsigned int)degree_))
{
assert(bernstein_.size() == size_);
In it(PointsBegin);
......@@ -76,7 +76,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
, mult_T_(1.)
, size_(std::distance(PointsBegin, PointsEnd))
, degree_(size_-1)
, bernstein_(curve::makeBernstein<num_t>((unsigned int)degree_))
, bernstein_(curves::makeBernstein<num_t>((unsigned int)degree_))
{
assert(bernstein_.size() == size_);
In it(PointsBegin);
......@@ -101,7 +101,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
, mult_T_(mult_T)
, size_(std::distance(PointsBegin, PointsEnd))
, degree_(size_-1)
, bernstein_(curve::makeBernstein<num_t>((unsigned int)degree_))
, bernstein_(curves::makeBernstein<num_t>((unsigned int)degree_))
{
assert(bernstein_.size() == size_);
In it(PointsBegin);
......@@ -124,7 +124,7 @@ struct bezier_curve : public curve_abc<Time, Numeric, Dim, Safe, Point>
, mult_T_(1.)
, size_(std::distance(PointsBegin, PointsEnd)+4)
, degree_(size_-1)
, bernstein_(curve::makeBernstein<num_t>((unsigned int)degree_))
, bernstein_(curves::makeBernstein<num_t>((unsigned int)degree_))
{
if(Safe && (size_<1 || T_ <= 0.))
throw std::out_of_range("can't create bezier min bound is higher than max bound");
......
......@@ -21,7 +21,7 @@
#include <iostream>
namespace curve
namespace curves
{
/// \brief Provides methods for converting a curve from a bernstein representation
/// to a polynom representation.
......@@ -64,6 +64,6 @@ Bezier from_polynom(const Polynom& polynom)
typedef Bezier::cit_point_t cit_point_t;
typedef Bezier::bezier_curve_t bezier_curve_t;
}*/
} // namespace curve
} // namespace curves
#endif //_BEZIER_POLY_CONVERSION
......@@ -20,7 +20,7 @@
#include <stdexcept>
namespace curve
namespace curves
{
/// \brief Creates coefficient vector of a cubic spline defined on the interval
/// \f$[t_{min}, t_{max}]\f$. It follows the equation :
......@@ -41,6 +41,6 @@ polynom<Time,Numeric,Dim,Safe,Point,T_Point> create_cubic(Point const& a, Point
T_Point coeffs = make_cubic_vector<Point, T_Point>(a,b,c,d);
return polynom<Time,Numeric,Dim,Safe,Point,T_Point>(coeffs.begin(),coeffs.end(), t_min, t_max);
}
} // namespace curve
} // namespace curves
#endif //_STRUCT_CUBICSPLINE
......@@ -16,7 +16,7 @@
#include <functional>
namespace curve
namespace curves
{
/// \struct curve_abc
/// \brief Represents a curve of dimension Dim
......@@ -63,6 +63,6 @@ struct curve_abc : std::unary_function<Time, Point>
/*Helpers*/
};
} // namespace curve
} // namespace curves
#endif //_STRUCT_CURVE_ABC
......@@ -17,7 +17,7 @@
#include <functional>
#include <vector>
namespace curve
namespace curves
{
template <typename Point>
struct curve_constraints
......@@ -32,5 +32,5 @@ struct curve_constraints
point_t end_vel;
point_t end_acc;
};
} // namespace curve
} // namespace curves
#endif //_CLASS_CUBICZEROVELACC
......@@ -29,7 +29,7 @@
#include <functional>
#include <vector>
namespace curve
namespace curves
{
/// \class ExactCubic.
/// \brief Represents a set of cubic splines defining a continuous function
......@@ -201,6 +201,6 @@ struct exact_cubic : public curve_abc<Time, Numeric, Dim, Safe, Point>
t_spline_t subSplines_; // const
/*Attributes*/
};
} // namespace curve
} // namespace curves
#endif //_CLASS_EXACTCUBIC
......@@ -5,5 +5,5 @@ SET(${PROJECT_NAME}_HELPERS_HEADERS
INSTALL(FILES
${${PROJECT_NAME}_HELPERS_HEADERS}
DESTINATION include/curve/helpers
DESTINATION include/curves/helpers
)
......@@ -20,9 +20,9 @@
#ifndef _CLASS_EFFECTORSPLINE
#define _CLASS_EFFECTORSPLINE
#include "curve/spline_deriv_constraint.h"
#include "curves/spline_deriv_constraint.h"
namespace curve
namespace curves
{
namespace helpers
{
......@@ -118,5 +118,5 @@ exact_cubic_t* effector_spline(
return new exact_cubic_t(splines);
}
} // namespace helpers
} // namespace curve
} // namespace curves
#endif //_CLASS_EFFECTORSPLINE
......@@ -20,11 +20,11 @@
#ifndef _CLASS_EFFECTOR_SPLINE_ROTATION
#define _CLASS_EFFECTOR_SPLINE_ROTATION
#include "curve/helpers/effector_spline.h"
#include "curve/curve_abc.h"
#include "curves/helpers/effector_spline.h"
#include "curves/curve_abc.h"
#include <Eigen/Geometry>
namespace curve
namespace curves
{
namespace helpers
{
......@@ -252,5 +252,5 @@ class effector_spline_rotation
};
} // namespace helpers
} // namespace curve
} // namespace curves
#endif //_CLASS_EFFECTOR_SPLINE_ROTATION
......@@ -19,7 +19,7 @@
#include <Eigen/Core>
#include <stdexcept>
namespace curve
namespace curves
{
template <int Dim, typename Numeric=double>
struct linear_variable{
......@@ -196,6 +196,6 @@ variables<V> operator/(const variables<V>& w,const double k)
return res;
}
} // namespace curve
} // namespace curves
#endif //_CLASS_LINEAR_VARIABLE
......@@ -12,15 +12,15 @@
#ifndef _CLASS_SPLINEOPTIMIZER
#define _CLASS_SPLINEOPTIMIZER
#include "curve/MathDefs.h"
#include "curve/exact_cubic.h"
#include "curves/MathDefs.h"
#include "curves/exact_cubic.h"
#include "mosek/mosek.h"
#include <Eigen/SparseCore>
#include <utility>
namespace curve
namespace curves
{
/// \class SplineOptimizer
/// \brief Mosek connection to produce optimized splines
......@@ -516,5 +516,5 @@ inline exact_cubic<Time, Numeric, Dim, Safe, Point>*
return res;
}
} // namespace curve
} // namespace curves
#endif //_CLASS_SPLINEOPTIMIZER
......@@ -23,7 +23,7 @@
#include <functional>
#include <stdexcept>
namespace curve
namespace curves
{
/// \class polynom
/// \brief Represents a polynomf arbitrary order defined on the interval
......@@ -199,6 +199,6 @@ struct polynom : public curve_abc<Time, Numeric, Dim, Safe, Point>
return res;
}
}; //class polynom
} // namespace curve
} // namespace curves
#endif //_STRUCT_POLYNOM
......@@ -20,7 +20,7 @@
#include <stdexcept>
namespace curve
namespace curves
{
/// \brief Creates coefficient vector of a quintic spline defined on the interval
/// \f$[t_{min}, t_{max}]\f$. It follows the equation :
......@@ -44,6 +44,6 @@ polynom<Time,Numeric,Dim,Safe,Point,T_Point> create_quintic(Point const& a, Poin
T_Point coeffs = make_quintic_vector<Point, T_Point>(a,b,c,d,e,f);
return polynom<Time,Numeric,Dim,Safe,Point,T_Point>(coeffs.begin(),coeffs.end(), t_min, t_max);
}
} // namespace curve
} // namespace curves
#endif //_STRUCT_QUINTIC_SPLINE
......@@ -28,7 +28,7 @@
#include <functional>
#include <vector>
namespace curve
namespace curves
{
/// \class spline_deriv_constraint.
/// \brief Represents a set of cubic splines defining a continuous function
......@@ -137,6 +137,6 @@ struct spline_deriv_constraint : public exact_cubic<Time, Numeric, Dim, Safe, Po
private:
/* Constructors - destructors */
};
} // namespace curve
} // namespace curves
#endif //_CLASS_CUBICZEROVELACC
SET(${PY_NAME}_BINDINGS_SOURCES
curve_python.cpp
curves_python.cpp
python_variables.cpp
python_variables.h
)
......@@ -15,4 +15,4 @@ ENDIF(APPLE)
INSTALL(TARGETS ${PY_NAME} DESTINATION ${PYTHON_SITELIB})
ADD_PYTHON_UNIT_TEST("python-curve" "python/test/test.py" "python")
ADD_PYTHON_UNIT_TEST("python-curves" "python/test/test.py" "python")
Markdown is supported
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