Skip to main content

unscaled_block_amax

Function unscaled_block_amax 

Source
pub fn unscaled_block_amax(v: &dyn Vector, scale: Option<&[Number]>) -> Number
Expand description

Max-norm of v after dividing each entry by its per-row scale factor (max_i |v_i / scale_i|). scale == None means “no row scaling” and returns the plain v.amax(); a zero factor for an entry is treated as the identity (no divide) so a degenerate scale never yields infinities. Falls back to v.amax() for a non-dense backing — POUNCE is dense-only, so that branch is defensive.

Public because pounce-restoration’s locally-infeasible gates compare a constraint violation against absolute floors (1e-4 / 1e-3) and so must measure it in the same user-facing units this produces — see resto_inner_solver::eval_orig_inf_pr_at_inner_curr. One definition, so the two call sites cannot drift.