pub fn force_positive_a(
a: &mut [f64],
b: &mut [f64],
s: &[f64],
num_stationary: (usize, usize),
a_min: f64,
) -> boolExpand description
Post-process (a, b) so that interpolated a(s) stays strictly positive per interval.
This is a numerical safety utility for downstream timing integration on profiles that may be very close to zero due to finite precision.
§Returns
Returns true when in-place adjustment succeeds, otherwise false.
§Errors
This function does not return Result; invalid inputs are reported by false
with diagnostic prints.
§Contract
- requires
a.len() == b.len() == s.len()ands.len() >= 4; - requires endpoint
avalues to be nonnegative.