pub fn force_positive_a(
profile: Topp3ProfileMut<'_>,
s: &[f64],
a_min: f64,
) -> Result<bool, CoppError>Expand description
Post-process a mutable (a, b) profile 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
Returns CoppError::InvalidInput when dimensions, station ordering, profile
positivity, stationary counts, or numeric finiteness requirements are violated.
§Contract
- requires
a.len() == b.len() == s.len()ands.len() >= 4; - requires endpoint
avalues to be nonnegative.