37 std::size_t stationary_start,
38 std::size_t stationary_end);
40 std::size_t
len() const noexcept {
return a.size(); }
41 std::size_t
size() const noexcept {
return a.size(); }
42 bool empty() const noexcept {
return a.empty(); }
70 std::vector<double>
a;
71 std::vector<double>
b;
76 Profile3rd(std::vector<double> a_values, std::vector<double> b_values);
78 std::vector<double> a_values,
79 std::vector<double> b_values,
82 std::vector<double> a_values,
83 std::vector<double> b_values,
84 std::size_t stationary_start,
85 std::size_t stationary_end);
87 std::size_t
len() const noexcept {
return a.size(); }
88 std::size_t
size() const noexcept {
return a.size(); }
89 bool empty() const noexcept {
return a.empty(); }
Small C++17 expected-like result used by no-throw overloads.
Non-owning view of a contiguous one-dimensional array.
auto expected_from(Fn &&fn) -> Expected< typename std::decay< decltype(fn())>::type >
Time-conversion helpers for TOPP2/TOPP3 profiles, including s -> t, uniform t -> s,...
COPP_API std::vector< double > t_to_s_topp2_uniform(Span< const double > s, Span< const double > a, Span< const double > t_s, double dt, TimeGridOptions options={})
Sample the inverse TOPP2 mapping s(t) on a uniform time grid.
COPP_API std::vector< double > a_to_b_topp2(Span< const double > s, Span< const double > a)
Compute segment profile b from node profile a.
COPP_API TimeProfile s_to_t_topp2(Span< const double > s, Span< const double > a, double t0=0.0)
Convert a second-order path profile a(s) = ds/dt squared to t(s).
COPP_API std::vector< double > t_to_s_topp3_samples(Span< const double > s, const Profile3rd &profile, Span< const double > t_s, Span< const double > t_sample)
Sample the inverse TOPP3 mapping s(t) at explicit query times.
COPP_API std::vector< double > t_to_s_topp2_samples(Span< const double > s, Span< const double > a, Span< const double > t_s, Span< const double > t_sample)
Sample the inverse TOPP2 mapping s(t) at explicit query times.
COPP_API TimeProfile s_to_t_topp3(Span< const double > s, const Profile3rd &profile, double t0=0.0)
Convert a third-order profile to cumulative time t(s).
COPP_API std::vector< double > t_to_s_topp3_uniform(Span< const double > s, const Profile3rd &profile, Span< const double > t_s, double dt, TimeGridOptions options={})
Sample the inverse TOPP3 mapping s(t) on a uniform time grid.
Root namespace for the C++ facade: paths, robots, constraints, matrices, profiles,...
Tag object selecting no-throw overloads.
Owned third-order TOPP/COPP profile.
std::size_t size() const noexcept
Profile3rd(std::vector< double > a_values, std::vector< double > b_values)
bool empty() const noexcept
std::size_t num_stationary_start
std::pair< std::size_t, std::size_t > num_stationary() const noexcept
Profile3rd(std::vector< double > a_values, std::vector< double > b_values, std::size_t stationary_start, std::size_t stationary_end)
std::size_t len() const noexcept
Profile3rdRef slice(std::size_t idx_s_start, std::size_t idx_s_final) const
Borrow a closed station subrange idx_s_start..=idx_s_final.
Profile3rdRef segment(std::size_t idx_s) const
Borrow one segment as the two-node profile idx_s..=idx_s+1.
std::size_t num_stationary_end
Profile3rdRef ref() const
Borrow this owned profile without copying arrays.
Profile3rd(std::vector< double > a_values, std::vector< double > b_values, std::pair< std::size_t, std::size_t > num_stationary)
Borrowed third-order TOPP/COPP profile view.
std::size_t num_stationary_start
bool empty() const noexcept
std::pair< std::size_t, std::size_t > num_stationary() const noexcept
Profile3rdRef(Span< const double > a_values, Span< const double > b_values, std::size_t stationary_start, std::size_t stationary_end)
Profile3rdRef(Span< const double > a_values, Span< const double > b_values, std::pair< std::size_t, std::size_t > num_stationary)
Profile3rdRef slice(std::size_t idx_s_start, std::size_t idx_s_final) const
Borrow a closed station subrange idx_s_start..=idx_s_final.
std::size_t len() const noexcept
std::size_t size() const noexcept
std::size_t num_stationary_end
Profile3rdRef segment(std::size_t idx_s) const
Borrow one segment as the two-node profile idx_s..=idx_s+1.
Profile3rdRef(Span< const double > a_values, Span< const double > b_values)
Options for generating a uniform s(t) sampling grid.
Cumulative time profile returned by s_to_t_topp2.
std::vector< double > t_s