equilibrate

Function equilibrate 

Source
pub(crate) fn equilibrate(
    operator: &mut DMatrix<Complex>,
) -> Result<Option<Equilibration>>
Expand description

Equilibrate severely unbalanced finite square operators in place.

Small-argument, high-order multipole operators can have unit diagonal and off-diagonal entries exceeding 1e20. Their unscaled LU loses accuracy even when the equivalent equilibrated system is well conditioned. The scan that rejects non-finite entries also measures the spread of entry sizes. An operator whose nonzero entries, or whose diagonal entries, all lie within a factor of 10 of the largest entry stays unchanged; others get unit row and column maxima, as in LAPACK xGEEQU, then balance evens out their sums.