23 { T::Degree } -> std::convertible_to<int>;
24 { T::OptDeg } -> std::convertible_to<int>;
25 { T::InnCnt } -> std::convertible_to<int>;
31namespace spline_specs {
38template<LieGroup G,
int K>
46 static constexpr int InnCnt = int(K) - 1;
49 static constexpr std::array<int, 0>
LeftDeg{};
54 static constexpr std::array<int, 0>
RghtDeg{};
73template<LieGroup G,
int P1 = 2,
int P2 = P1>
84 static constexpr std::array<int, 1>
LeftDeg{P1};
89 static constexpr std::array<int, 1>
RghtDeg{P2};
101template<LieGroup G,
int K = 6,
int O = 3,
int P = 3>
112 static constexpr std::array<int, std::size_t(P - 1)>
LeftDeg = []() {
113 std::array<int, std::size_t(P - 1)> ret;
114 for (
auto i = 0; i + 1 < P; ++i) { ret[
static_cast<std::size_t
>(i)] = i + 1; }
120 std::array<Tangent<G>, std::size_t(P - 1)> ret;
168 std::ranges::random_access_range
auto && ts, std::ranges::random_access_range
auto && gs,
const SplineSpec auto & ss);
201auto fit_bspline(std::ranges::range
auto && ts, std::ranges::range
auto && gs,
const double dt);
204#include "detail/fit_impl.hpp"
auto fit_spline(std::ranges::random_access_range auto &&ts, std::ranges::random_access_range auto &&gs, const SplineSpec auto &ss)
Fit a Spline to given points.
Eigen::VectorXd fit_spline_1d(std::ranges::sized_range auto &&dt_r, std::ranges::sized_range auto &&dx_r, const SplineSpec auto &ss)
Find N degree K Bernstein polynomials p_i(t) for i = 0, ..., N s.t that satisfies constraints and s....
auto fit_bspline(std::ranges::range auto &&ts, std::ranges::range auto &&gs, const double dt)
Fit a bpsline to data points by solving the optimization problem.
auto fit_spline_cubic(std::ranges::range auto &&ts, std::ranges::range auto &&gs)
Fit a cubic Spline with natural boundary conditions.
Eigen::Vector< Scalar< M >, Dof< M > > Tangent
Tangent as a Dof-length vector.
Piecewise polynomial splines on lie groups.
SplineSpec for a cubic spline with two boundary conditions.
static constexpr int OptDeg
Optimization degree (absolute integral of derivative OptDeg is minimized)
std::array< Tangent< G >, 1 > rght_values
Values of right-side boundary constraints.
static constexpr std::array< int, 1 > LeftDeg
Degrees of left-side boundary constraints: P1.
static constexpr int InnCnt
Number of derivatives to enforce continuity for.
static constexpr std::array< int, 1 > RghtDeg
Degrees of right-side boundary constraints: P2.
static constexpr int Degree
Polynomial degree.
std::array< Tangent< G >, 1 > left_values
Values of left-side boundary constraints.
SplineSpec for optimized spline.
static constexpr std::array< int, std::size_t(P - 1)> RghtDeg
Degrees of left-side boundary constraints: 1, 2, ..., P-1.
std::array< Tangent< G >, std::size_t(P - 1)> left_values
Values of left-side boundary constraints.
static constexpr std::array< int, std::size_t(P - 1)> LeftDeg
Degrees of left-side boundary constraints: 1, 2, ..., P-1.
std::array< Tangent< G >, std::size_t(P - 1)> rght_values
Values of right-side boundary constraints.
static constexpr int InnCnt
Number of derivatives to enforce continuity for.
static constexpr int Degree
Polynomial degree.
static constexpr int OptDeg
Optimization degree (absolute integral of derivative OptDeg is minimized)
SplineSpec without boundary constraints.
static constexpr std::array< int, 0 > LeftDeg
Degrees of left-side boundary constraints (no constraints)
static constexpr std::array< int, 0 > RghtDeg
Degrees of right-side boundary constraints (no constraints)
static constexpr int OptDeg
Optimization degree (absolute integral of derivative OptDeg is minimized)
std::array< Tangent< G >, 0 > left_values
Values of left-side boundary constraints.
std::array< Tangent< G >, 0 > rght_values
Values of right-side boundary constraints.
static constexpr int InnCnt
Number of derivatives to enforce continuity for.
static constexpr int Degree
Polynomial degree.