16 constexpr std::size_t dim = 2;
28 for (std::size_t j = 0; j < s.
size(); ++j)
30 const double x = s[j];
35 q(1, j) = std::sin(x);
36 dq(1, j) = std::cos(x);
37 ddq(1, j) = -std::sin(x);
43 std::vector<double> samples{0.0, 0.5, 1.0};
47 std::cout <<
"dim = " << path.dim() <<
"\n";
48 std::cout <<
"q(1, 1) = " << out.
q(1, 1) <<
"\n";
49 std::cout <<
"dq(1, 1) = " << out.dq.value()(1, 1) <<
"\n";
50 std::cout <<
"ddq(1, 1) = " << out.ddq.value()(1, 1) <<
"\n";
Mutable column-major matrix view used by callback APIs.
static Path from_evaluator_2nd(std::size_t dim, double s_min, double s_max, PathEvaluator2nd evaluator)
Build a path from a batch evaluator with explicit derivatives up to second order.
PathDerivatives evaluate_up_to_2nd(Span< const double > s) const
Evaluate position, first derivative, and second derivative.
Non-owning view of a contiguous one-dimensional array.
constexpr std::size_t size() const noexcept