pub fn kappa_sigma_clamp(
z: &mut [Number],
slack: &[Number],
mu: Number,
kappa_sigma: Number,
) -> NumberExpand description
Per-element kappa-sigma clamp — the elementwise arithmetic at the
heart of IpIpoptAlg.cpp:correct_bound_multiplier (lines
1090-1133). For each index i:
slack_i = max(slack_i, tiny_double) // avoid /0
z_lo_i = mu / (kappa_sigma * slack_i)
z_hi_i = kappa_sigma * mu / slack_i
z_i ← clamp(z_i, z_lo_i, z_hi_i)Returns the maximum elementwise correction magnitude (matching
upstream’s Max(max_correction_up, max_correction_low)).
kappa_sigma < 1 short-circuits to the identity per upstream’s
guard at line 1065.