Time-conversion helpers for TOPP2/TOPP3 profiles, including s -> t, uniform t -> s, explicit-sample t -> s, and third-order profile slicing. More...
Classes | |
| struct | TimeProfile |
| Cumulative time profile returned by s_to_t_topp2. More... | |
| struct | TimeGridOptions |
| Options for generating a uniform s(t) sampling grid. More... | |
Functions | |
| 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. | |
| Expected< std::vector< double > > | a_to_b_topp2 (Span< const double > s, Span< const double > a, NoThrowTag) |
| 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). | |
| Expected< TimeProfile > | s_to_t_topp2 (Span< const double > s, Span< const double > a, double t0, NoThrowTag) |
| Expected< TimeProfile > | s_to_t_topp2 (Span< const double > s, Span< const double > a, NoThrowTag tag) |
| 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. | |
| Expected< 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, NoThrowTag) |
| Expected< std::vector< double > > | t_to_s_topp2_uniform (Span< const double > s, Span< const double > a, Span< const double > t_s, double dt, NoThrowTag tag) |
| 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. | |
| Expected< 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, NoThrowTag) |
| 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 TimeProfile | s_to_t_topp3 (Span< const double > s, Profile3rdRef profile, double t0=0.0) |
| Expected< TimeProfile > | s_to_t_topp3 (Span< const double > s, const Profile3rd &profile, double t0, NoThrowTag) |
| Expected< TimeProfile > | s_to_t_topp3 (Span< const double > s, const Profile3rd &profile, NoThrowTag tag) |
| Expected< TimeProfile > | s_to_t_topp3 (Span< const double > s, Profile3rdRef profile, double t0, NoThrowTag) |
| Expected< TimeProfile > | s_to_t_topp3 (Span< const double > s, Profile3rdRef profile, NoThrowTag tag) |
| 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. | |
| COPP_API std::vector< double > | t_to_s_topp3_uniform (Span< const double > s, Profile3rdRef profile, Span< const double > t_s, double dt, TimeGridOptions options={}) |
| Expected< std::vector< double > > | t_to_s_topp3_uniform (Span< const double > s, const Profile3rd &profile, Span< const double > t_s, double dt, TimeGridOptions options, NoThrowTag) |
| Expected< std::vector< double > > | t_to_s_topp3_uniform (Span< const double > s, const Profile3rd &profile, Span< const double > t_s, double dt, NoThrowTag tag) |
| Expected< std::vector< double > > | t_to_s_topp3_uniform (Span< const double > s, Profile3rdRef profile, Span< const double > t_s, double dt, TimeGridOptions options, NoThrowTag) |
| Expected< std::vector< double > > | t_to_s_topp3_uniform (Span< const double > s, Profile3rdRef profile, Span< const double > t_s, double dt, NoThrowTag tag) |
| 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_topp3_samples (Span< const double > s, Profile3rdRef profile, Span< const double > t_s, Span< const double > t_sample) |
| Expected< 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, NoThrowTag) |
| Expected< std::vector< double > > | t_to_s_topp3_samples (Span< const double > s, Profile3rdRef profile, Span< const double > t_s, Span< const double > t_sample, NoThrowTag) |
Time-conversion helpers for TOPP2/TOPP3 profiles, including s -> t, uniform t -> s, explicit-sample t -> s, and third-order profile slicing.
| COPP_API std::vector< double > copp::interpolation::a_to_b_topp2 | ( | Span< const double > | s, |
| Span< const double > | a ) |
Compute segment profile b from node profile a.
For every segment [s[k], s[k + 1]], this returns b[k] = 0.5 * (a[k + 1] - a[k]) / (s[k + 1] - s[k]).
| s | Strictly increasing station grid of length N. |
| a | Node profile of length N. |
| copp::Error | if lengths, station ordering, or finite-value checks fail. |
|
inline |
Definition at line 140 of file interpolation.hpp.
| COPP_API TimeProfile copp::interpolation::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).
Input requirements mirror the Rust/Python APIs:
The default API throws copp::Error when validation or interpolation fails. The returned vector owns its data.
| s | Strictly increasing station grid. |
| a | Node profile a[k] = (ds/dt)^2. |
| t0 | Initial time offset. |
|
inline |
Definition at line 171 of file interpolation.hpp.
|
inline |
Definition at line 180 of file interpolation.hpp.
| COPP_API std::vector< double > copp::interpolation::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.
t_s is normally returned by s_to_t_topp2. Out-of-range generated samples are represented as NaN by the Rust core. If options.include_final is true, the final station is appended when the uniform grid does not land exactly on it.
|
inline |
Definition at line 200 of file interpolation.hpp.
|
inline |
Definition at line 211 of file interpolation.hpp.
| COPP_API std::vector< double > copp::interpolation::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.
t_sample must be finite, non-empty, and strictly increasing. Values outside the range of t_s are returned as NaN.
|
inline |
Definition at line 230 of file interpolation.hpp.
| COPP_API TimeProfile copp::interpolation::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).
The public profile object owns a and b; the Profile3rdRef overload is the zero-copy advanced form used for slicing or external storage. No raw (a, b, num_stationary) overload is exposed publicly.
| s | Strictly increasing station grid. |
| profile | Node-based third-order profile. |
| t0 | Initial time offset. |
| COPP_API TimeProfile copp::interpolation::s_to_t_topp3 | ( | Span< const double > | s, |
| Profile3rdRef | profile, | ||
| double | t0 = 0.0 ) |
|
inline |
Definition at line 266 of file interpolation.hpp.
|
inline |
Definition at line 275 of file interpolation.hpp.
|
inline |
Definition at line 283 of file interpolation.hpp.
|
inline |
Definition at line 292 of file interpolation.hpp.
| COPP_API std::vector< double > copp::interpolation::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.
t_s is normally returned by s_to_t_topp3. Generated out-of-range samples are represented as NaN by the Rust core.
| COPP_API std::vector< double > copp::interpolation::t_to_s_topp3_uniform | ( | Span< const double > | s, |
| Profile3rdRef | profile, | ||
| Span< const double > | t_s, | ||
| double | dt, | ||
| TimeGridOptions | options = {} ) |
|
inline |
Definition at line 316 of file interpolation.hpp.
|
inline |
Definition at line 328 of file interpolation.hpp.
|
inline |
Definition at line 338 of file interpolation.hpp.
|
inline |
Definition at line 350 of file interpolation.hpp.
| COPP_API std::vector< double > copp::interpolation::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.
| s | Strictly increasing station grid. |
| profile | Node-based third-order profile. |
| t_s | Cumulative time samples returned by s_to_t_topp3. |
| t_sample | Explicit query times. Values outside the interpolation domain are returned as NaN, matching Rust/Python. |
| COPP_API std::vector< double > copp::interpolation::t_to_s_topp3_samples | ( | Span< const double > | s, |
| Profile3rdRef | profile, | ||
| Span< const double > | t_s, | ||
| Span< const double > | t_sample ) |
|
inline |
Definition at line 378 of file interpolation.hpp.
|
inline |
Definition at line 388 of file interpolation.hpp.