Skip to main content

check_limits_tol

Function check_limits_tol 

Source
pub fn check_limits_tol<const N: usize>(
    n_check: usize,
    x: &[f32; N],
    xmin: &[f32; N],
    xmax: &[f32; N],
    output: &mut [i8; N],
    perm: Option<&[usize; N]>,
) -> usize
Expand description

Check which elements of x violate bounds, with relative + absolute tolerance.

For each i in 0..n_check, examines x[perm[i]] (or x[i] when perm is None) against xmin / xmax. Returns the number of violations, and writes +1 (upper), -1 (lower), or 0 (feasible) into output.