pub fn s_to_t_topp2(s: &[f64], a: &[f64], t0: f64) -> (f64, Vec<f64>)Expand description
Compute cumulative time profile t(s) from a(s).
§Semantics
t_s[i]is the time at stations[i].- initial condition is
t_s[0] = t0. - returns
(t_final, t_s)wheret_final == *t_s.last().unwrap().
§Input contract
- valid when
s.len() >= 2anda.len() == s.len(); - otherwise returns
(NaN, empty).
§Returns
Returns (t_final, t_s) with t_s.len() == s.len() on valid input.
§Errors
This function does not return Result; invalid input is mapped to (NaN, vec![]).
§Contract
t_sis monotonically increasing whenais nonnegative andsis increasing.t_s[0] == t0always holds on valid input.